Video coding apparatus

ABSTRACT

A video coding apparatus comprising a memory for storing a coded picture signal used as a reference picture signal, a vector detecting circuit for detecting, from plural field picture signals or plural frame picture signals which are read out from the memory and the reference picture signals, an optimum motion regarding a picture to be coded, a prediction signal producing circuit for subjecting a spatial-temporal filtering to a reference picture designated by the optimum motion vector to produce a prediction signal, and a coding circuit for coding the to-be coded picture signal on the basis of the prediction signal.

This application is a Continuation of application Ser No. 09/054,403,filed on Apr. 3, 1998; which is a Division of Ser. No. 08/626,922 filedon Apr. 3, 1996, now U.S. Pat. No. 5,754,231; which is a Division ofSer. No. 08/295,421, filed on Aug. 25, 1994, now U.S. Pat. No.5,541,661; which is a Continuation of Ser. No. 08/156,709, filed on Nov.24, 1993, now U.S. Pat. No. 5,424,779; which is a Continuation of Ser.No. 07/890,705, filed on May 29, 1992, now U.S. Pat. No. 5,317,397.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to an apparatus for coding a video signalin video communication, video transmission, video storing, andbroadcasting and, more particularly, to a video coding apparatus usingmotion compensation predictive coding.

2. Description of the Related Art

A TV telephone, a TV meeting system, an optical disk apparatus, a VTR, aCATV, and the like require a technique for coding a video signal. Assuch a video coding scheme, so-called motion compensation predictioncoding is known. In this scheme, a pixel value of a picture to be coded(to be referred to as a to-be-coded picture hereinafter) is predicted byusing a pixel value of a coded picture designated by a motion vector,and a corresponding predictive error and the motion vector are coded.

Assume that such a motion compensation predictive coding scheme isapplied to an interlaced video (field picture) signal. In this case, thescheme is not suitable for a motion precision higher than an intra-field1/2 line, e.g., a higher precision than an intra-frame one line, becausethere is no corresponding pixel value in a reference picture.

For this reason, a method of performing motion compensation byinterpolating a pixel value of a corresponding pixel which does notexist on a reference picture using the pictures of the two adjacentfields has been proposed (e.g., "Adaptive Line Interpolated Inter-fieldMotion Compensation Method", Image Coding Symposium, 1990, (PCSJ90),8-1). In this motion compensation method, a to-be-coded picture is codedby using a reference picture and an optimum motion vector. The referencevideo signal is formed by interpolation using a signal, of coded videosignals of past two fields, which is located at a position designated bya motion vector obtained by a motion vector searching circuit. Morespecifically, three field memories are prepared, and a signal obtainedby performing intra-field interpolation using an output from the firstfield memory is mixed with an output from the second field memory at amixing ratio of km: 1-km. The value km varies depending on the motionmagnitude detected by a motion magnitude detection circuit on the basisof outputs from the first and third field memories.

According to this conventional technique, an interpolation value isformed by using the video signals of two adjacent fields in accordancewith the motion magnitude so that an appropriate reference video signalcorresponding to a motion precision higher than an intra-field 1/2 line(a motion precision higher than an intra-frame 1 line) can be generatedfor a field picture, thereby allowing high-precision motion compensationpredictive coding.

In this scheme, however, the motion between two reference pictures mustbe detected, as described above, and hence a motion magnitude detectioncircuit is required. In addition, in order to perform motion magnitudedetection, the pictures of three adjacent fields must be coded beforethe detection. If the pictures of three adjacent fields are not codedbefore motion magnitude detection, the detection cannot be performed.

In a conventional video coding apparatus using the above-describedmotion compensation predictive coding scheme, when a search for a motionvector for motion compensation is performed in a forward or backwarddirection, a reference picture for searching for the motion vector islimited to one coded picture in a case that a to-be-coded picture is anon-interlaced video. For reasons of this, accurate motion compensationcannot be performed with respect to a video which moves between adjacentpictures in units of 1/2 pixels.

Of the above-described video coding schemes, a video coding schemehaving a transmission rate of about 1 to 2 Mbps has been developed to bea standard, which is termed "MPEG1", for a picture storage such as VCRsand optical disks. This scheme is based on motion compensationinter-frame prediction and DCT (Discrete Cosine Transform).

A scheme For coding a video having high quality equal to or higher thanquality for TV broadcasting at about 2 to 10 Mbps has been studied forthe same purpose as described above. A coding scheme of MPEG1 isdesigned to be applied to a non-interlaced video as input signals.However, since the standard TV signal is interlaced video, where thecoding scheme MPEG1 is applied to the interlaced video, a new meanssuitable for interlaced video is required. An inter-field/inter-frameadaptive prediction scheme is known as a coding method of interlacedvideo. In this scheme, a field having the same scan phase as that of acoding (to-be-coded) field (an odd field when an odd field is coded andvice versa), and a field having a scan phase different from that of thecoding (to-be-coded) field and close in time thereto (e.g., an evenfield when an odd field is coded and vice versa) are switched as aprediction signal. In addition, interpolation prediction has recentlybeen studied, which forms prediction signals by averaging signalsextracted from current and previous fields (e.g., F. Wang et al.,"High-quality coding of the even fields based on the odd fields ofinterlaced video sequences", IEEE trans. CS).

When an interlaced video is subjected to a predictive coding usingcurrent and previous fields as in the coding scheme MPEG1, the even andodd fields suitable for the interlaced video is applied to a prediction.In this case, since the amount of motion vector information is increasedwhen motion vectors are sent for the respective fields, means fordecreasing the amount of motion vector information without a decrease inefficiency is required. That is, it is required to improve theprediction precision with respect to an interlaced video and decreasethe information amount of predictive error coded outputs. In addition,it is required to minimize an increase in motion vector information.However, no effective techniques capable of satisfying such requirementshave been proposed yet.

As described above, in the conventional technique, in order tointerpolate between the pixels on a reference picture using two fieldpictures adjacent to the reference picture, motion magnitude detectionis required for the reference picture. Therefore, a motion magnitudedetection circuit is required, and the hardware inevitably becomescomplicated. In addition, if three adjacent fields are not coded beforemotion magnitude detection, the detection cannot be performed.

Furthermore, according to the conventional technique, since a referencepicture is limited to one coded picture in a search for a motion vector,accurate motion compensation cannot be performed with respect to a videowhich moves between pictures in units of 1/2 pixels. Further, if aprediction signal is formed referring to plural frames, since a largeamount of arithmetic operation is required to search for a motionvector, the motion vector search time is prolonged or the circuit sizeof the hardware is increased.

Moreover, in the conventional technique, the prediction precision withrespect to an interlaced video cannot be effectively improved, and theamount of motion vector information sent for the respective fields isundesirably increased.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a video codingapparatus which predicts one field from the other field within oneframe.

It is another object of the present invention to provide a video codingapparatus which searches for a region adjacent to the partial pictureswhich are to be coded from among a plurality of coded frames, andobtains prediction signals by performing spatial-temporal filtering ofthe pictures.

It is another object of the present invention to provide a video codingapparatus which obtains a prediction signal by limiting the searchingrange of motion vectors.

It is another object of the present invention to provide a video codingapparatus which forms different prediction values in accordance with thevalues of motion vectors.

According to the present invention, there is provided a video codingapparatus comprising:

a memory for storing a coded video signal used for prediction as areference video signal;

a motion vector detecting circuit for detecting, using from one fieldpicture signal read out from the memory, a motion vector regarding theother field picture signal to be coded, a pair of the one field picturesignal and the other field picture signal forming a frame video signal;

a prediction signal producing circuit for producing a prediction signalbased on a reference video signal designated by the motion vectordetected by the motion vector detecting circuit; and

a coding circuit for coding a difference between the prediction signaland a video signal corresponding to the other field picture signal to becoded.

According to the present invention, there is provided a video codingapparatus comprising:

a memory for storing a coded video signal used as a reference videosignal;

a vector detecting circuit for detecting, from plural field picturesignals or plural frame picture signals which are read out from thememory and the reference picture signals, an optimum motion regarding apicture signal to be coded;

a prediction signal producing circuit for subjecting a spatial-temporalfiltering to a reference picture signal designated by the optimum motionvector to produce a prediction signal; and

a coding circuit for coding the picture signal to be coded on the basisof the prediction signal.

According to the present invention, there is provided a video codingapparatus comprising:

a memory for storing a coded video signal used as a reference videosignal;

a motion vector detecting circuit for detecting, from a picture read outfrom the memory, a motion vector regarding the to-be-coded picturesignal;

a searching range limiting circuit for limiting a range of the referencepicture which the motion vector detecting means searches for in a motionvector detection;

a prediction signal producing circuit for producing a prediction signalbased on the reference video signal designated by the motion vectordetected by the motion vector detecting circuit; and

a coding circuit for coding the video signal on the basis of the motionvector and the prediction signal.

According to the invention there is provided a video coding apparatuscomprising:

a memory for storing a coded video signal used as a reference picturesignal;

a motion vector candidate generating circuit for generating pluralmotion vector candidates for designating plural partial pictures of aplurality of reference pictures read out from the memory;

a prediction signal candidate producing circuit for subjecting afiltering processing corresponding to a type of each of the motionvector candidates output from the motion vector candidate generatingcircuit to each of the partial pictures to produce a plurality ofprediction signal candidates;

a motion vector detecting circuit for selecting an optimum predictionsignal among the prediction signal candidates which is most optimum tothe to-be-coded picture, and outputting the optimum prediction signaland an optimum motion vector corresponding thereto; and

a coding circuit for coding the to-be-coded picture signal on the basisof a difference between the to-be-coded picture signal and the optimumprediction signal and the optimum motion vector.

Additional objects and advantages of the invention will be set forth inthe description which follows, and in part will be obvious from thedescription, or may be learned by practice of the invention. The objectsand advantages of the invention may be realized and obtained by means ofthe instrumentalities and combinations particularly pointed out in theappended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate presently preferred embodiments ofthe invention, and together with the general description given above andthe detailed description of the preferred embodiments given below, serveto explain the principles of the invention.

FIG. 1 is a block diagram of a video coding apparatus in accordance withthe first embodiment of the present invention;

FIGS. 2 to 4 are views each showing the relationship between videosignals of the respective frames according to the first embodiment;

FIG. 5 is a block diagram of a video coding apparatus in accordance withthe second embodiment of the present invention;

FIGS. 6A and 6B are views each showing the relationship between thevideo signals of the respective frames according to the secondembodiment;

FIG. 7 is a block diagram of a video coding apparatus in accordance withthe third embodiment of the present invention;

FIG. 8 is a block diagram of a video coding apparatus in accordance withthe fourth embodiment of the present invention;

FIG. 9 is a block diagram of a video coding apparatus in accordance withthe fifth embodiment of the present invention;

FIG. 10 is a block diagram of a video decoder;

FIG. 11 is a view showing a motion vector searching operation accordingto the present invention;

FIG. 12 is a view showing a motion vector searching operation accordingto the present invention;

FIG. 13 is a view showing a motion vector searching operation accordingto the present invention;

FIG. 14 is a view showing a motion vector searching operation accordingto the present invention;

FIG. 15 is a view showing a motion vector searching operation accordingto the present invention;

FIG. 16 is a view showing a motion vector searching operation accordingto the present invention;

FIG. 17 is a block diagram showing a video coding apparatus according tothe sixth embodiment of the present invention;

FIG. 18 is a view showing an input picture format in the sixthembodiment;

FIG. 19 is a view showing the hierarchical structure of coding units inthe sixth embodiment;

FIGS. 20A and 20B illustrate the arrangement of a group of pictures anda coding sequence in the sixth embodiment, respectively;

FIGS. 21A and 21B are views for explaining prediction methods for therespective pictures in the sixth embodiment;

FIG. 22 is a block diagram showing a video decoding apparatuscorresponding to the video coding apparatus in FIG. 7;

FIG. 23 is a block diagram showing an inter-field/inter-frame adaptiveprediction circuit in FIG. 17;

FIG. 24 is a view showing a telescopic search sequence in the sixthembodiment;

FIGS. 25A and 25B are views for explaining inter-field/inter-frameadaptive prediction processing in the sixth embodiment;

FIG. 26 is a view showing a manner of transmitting motion vectors in thesixth embodiment;

FIGS. 27A and 27B are a detailed example in which the moving vector of acolor signal is obtained from a motion vector in the sixth embodiment;

FIG. 28 is a flow chart showing part of the process of coding and ratecontrol in the sixth embodiment;

FIG. 29 is a flow chart showing the remaining part of the process ofcoding and rate control in the sixth embodiment;

FIG. 30 is a view showing allocation of amounts of bits to N pictures inthe sixth embodiment;

FIG. 31 is a view for explaining a method of determining the ratiobetween the amounts of bits allocated to the P1 picture and the Bpicture in the sixth embodiment;

FIG. 32 is a view showing a virtual buffer used for intra-picture ratecontrol in the sixth embodiment;

FIG. 33 is a block diagram showing the overall arrangement of a picturedecoding system according to the present invention;

FIG. 34 is a block diagram showing a variable length code decoderaccording to an embodiment of the present invention;

FIG. 35 is a block diagram showing an arrangement of an input datatemporary storage circuit in FIG. 34;

FIG. 36 is a block diagram showing an arrangement of a code lengthdetection/decoded value transform circuit in FIG. 34;

FIG. 37 is a block diagram showing another arrangement of a code lengthdetection/decoded value transform circuit;

FIG. 38 is a block diagram showing a video coding apparatus according toanother embodiment of the present invention;

FIG. 39 is a view showing the relationship between to-be-coded picturesand reference pictures to explain a video coding method according to thepresent invention; and

FIG. 40 is a view showing the relationship between to-be-coded picturesand reference pictures to explain another video coding method accordingto the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

According to an embodiment of the present invention shown in FIG. 1, avideo coding apparatus comprises a coding circuit 14 for coding an videosignal, two field memories 15 and 16 for storing the coded video signalsof past two fields, a motion vector searching circuit 17, aninterpolation circuit 19, and a local decoding circuit 25.

A to-be-coded video signal 11 is coded by the coding circuit 14 by usinga reference video signal 12 output from the interpolation circuit 19 andan optimum motion vector 13 output from the motion vector searchingcircuit 17. The reference video signal 12 is formed by the interpolationcircuit 19 using an video signal, of the coded video signals of past twofields stored in the field memories 15 and 16, which is located at aposition designated by a motion vector candidate 18 output from themotion vector searching circuit 17.

The motion vector searching circuit 17 is constituted by a correlationarithmetic operation circuit 20, a motion vector candidate generatingcircuit 21, an optimum vector decision circuit 22, and a switch circuit23. During a motion vector searching operation, motion vector candidates24 sequentially generated by the motion vector candidate generatingcircuit 21 are input to the field memories 15 and 16 through the switchcircuit 23, and a correlation arithmetic operation between the referencevideo signal 12 generated by the interpolation circuit 19 and theto-be-coded video signal 11 is performed by the correlation arithmeticoperation circuit 20 on the basis of these motion vector candidates. Theoptimum vector decision circuit 22 stores a motion vector at which thecorrelation between the to-be-coded video signal 11 and the referencevideo signal 12 is maximized, and outputs the optimum motion vector 13to the coding circuit 14 and the switch circuit 23 upon completion ofthe motion vector searching operation. The to-be-coded video signal 11is coded by the coding circuit 14 in accordance with this optimum motionvector 13 and the optimum reference video signal 12 from theinterpolation circuit 19. As a result, coded data 26 is output from thecoding circuit 14.

The local decoding circuit 25 forms a local decoded video signal 27 onthe basis of the optimum reference video signal 12 output from theinterpolation circuit 19 and the coded data 26 output from the codingcircuit 14. The local decoded video signal 27 is input to either thefield memory 15 or the field memory 16 through a switch circuit 28. Theoutput from the field memory 15 or 16 is input to the interpolationcircuit 19 through a switch circuit 29. In this case, the switchcircuits 28 and 29 are switched such that two video signals for forminga predetermined reference picture for a to-be-coded video are input tothe interpolation circuit 19.

The interpolation circuit 19 comprises an intra-field interpolationcircuit 30, multipliers 31 and 32, and an adder 33. The interpolationcircuit 19 forms the reference video signal 12 by mixing a signal,formed by the intra-field interpolation circuit 30 using an outputsignal from the field memory 15, with an output signal from the fieldmemory 16 at a mixing ratio of k: 1-k.

The motion vector candidate 18 output from the motion vector searchingcircuit 17 is also input to the interpolation circuit 19 to control aparameter k for determining the mixture ratio between output signalsfrom the field memories 15 and 16. More specifically, if the verticalcomponent of the motion vector candidate 18 corresponds to intra-fieldn+1/2 lines (n is an integer), control is performed to set k=1 so that acorresponding pixel value stored in the field memory 15 (in this case,it is assumed that a video close to a to-be-coded video is stored in thefield memory 15) is directly output as the reference video signal 12.

If the vertical component of the motion vector candidate 18 correspondsto intra-field n lines, an interpolation value (A) for the video signalof an adjacent field is formed by using output signals from the fieldmemories 15 and 16. More specifically, as shown in FIG. 2, aninterpolation value (A) 49 serving as a reference video signal for apixel value 45 in a to-be-coded video signal 44 is the sum of a value,obtained by multiplying the average value of pixel values 46 and 47formed by intra-field interpolation by km, and a value obtained bymultiplying a pixel value 48 by (1-km). If the absolute value of thevertical component of the motion vector candidate 18 is larger than acertain threshold value, it is considered that the motion of thereference picture is also large. In this case, since it is proper thatthe interpolation value (Δ) is interpolated by mainly using a signaladjacent to the interpolation value (Δ) of the same field stored in thefield memory 15, the parameter k is increased. In contrast to this, ifthe absolute value of the vertical component of the motion vectorcandidate 18 is smaller than the threshold value, it is considered thatthe motion of the reference picture is also small. In this case, sinceit is proper that the interpolation value (Δ) is interpolated by mainlyusing a signal adjacent to the interpolation value (Δ) in the fieldmemory 16, the parameter is k is decreased.

Note that if the to-be-coded picture 44 is adjacent to a referencepicture 41, as shown in FIG. 2, the effective use of a signal from thefield memory 16, obtained by decreasing the parameter k to a value closeto "0", as an interpolation value for the reference picture 41 is almostlimited to the case wherein the absolute value of the vertical componentof the motion vector candidate 18 is "0". In contrast to this, when twoadjacent fields (fields 1, 2, 7, and 8 in FIG. 3) are to be coded inadvance in the coding sequence shown in FIG. 3, i.e., at intervals of aplurality fields (six fields in FIG. 3), and the remaining four fields(fields 3 to 6 in FIG. 3) are to be subjected to prediction coding formotion compensation by using the two adjacent coded fields, ato-be-coded picture 53 and a reference picture 51 may be relativelyspaced apart from each other, as shown in FIG. 4. In such a case, asignal from the field memory 16, obtained by decreasing the parameter kto a value close to "0", can be effectively used as an interpolationvalue for the reference picture 51 even if the absolute value of thevertical component of the motion vector is not "0".

The second embodiment of the present invention will be described belowwith reference to FIG. 5. Since this embodiment is the same as the oneshown in FIG. 1 except for the arrangement of an interpolation circuit19, a detailed description thereof will be omitted.

The interpolation circuit 19 is constituted by two interpolators 34 and35 and a switch circuit 36 for selecting one of outputs from theinterpolators 34 and 35. Each of the interpolators 34 and 35 comprisesan inter-field interpolation circuit 30, multipliers 31 and 32, and anadder 33, similar to the interpolation circuit 19 shown in FIG. 1.

The relationship between a plurality of video signals in the embodimentshown in FIG. 5 will be described below with reference to FIGS. 6A and6B.

The first interpolator 34 generates an interpolation value which iseffective when the motion magnitude of a reference picture 61 is large.That is, as shown in FIG. 6A, when the vertical component of a motionvector candidate 18 corresponds to intra-field n+1/2 lines (n is aninteger), a corresponding pixel value ∘ stored in a field memory 15 (inthis case, it is assumed that a picture close to a to-be-coded picture63 is stored in the field memory 15) is directly output as a referencevideo signal (control is performed to set k=1).

When the vertical component of the motion vector candidate 18corresponds to intra-field n lines (n is an integer), the firstinterpolator 34 forms an interpolation value Δ on the basis of theaverage value of two pixel values ∘ of the video signal 61 in the fieldmemory 15 which are adjacent to a pixel Δ to be interpolated.

The second interpolator 35 generates an interpolation value which iseffective when the motion magnitude of the reference picture 61 issmall. That is, as shown in FIG. 6B, when the vertical component of themotion vector candidate 18 corresponds to intra-field n+1/2 lines (n isan integer), a corresponding pixel value ∘ stored in the field memory 15(in this case, it is assumed that a picture close to the to-be-codedpicture 63 is stored in the field memory 15) is directly output as areference video signal (control is performed to set k=1). If, forexample, n=0, a reference video signal corresponding to a to-be-codedvideo signal 64 corresponds to a pixel value 65.

In addition, when the vertical component of the motion vector candidate18 corresponds to intra-field n lines, the second interpolator 35 setsan adjacent signal ∘ in a field memory 16 as a pixel value ⊚ to beinterpolated. If, for example, n=0, an interpolation value 68 of areference video signal for the to-be-coded video signal 64 correspondsto a pixel value 66.

If the vertical component of the motion vector candidate 18 correspondsto intra-field n/2+1/4 lines, an interpolation value Δ is formed on thebasis of the average value of pixel values ∘ from the field memories 15and 16 which are adjacent to a pixel Δ to be interpolated. For example,if n=0, an interpolation value 67 of a reference video signal for theto-be-coded video signal 64 corresponds to the average value of thepixel values 65 and 66.

In this manner, the interpolator 35 can generate reference video signalsin units of intra-field 1/4 lines to realize effective motioncompensation for a high-resolution picture having a small motionmagnitude.

In this case, the switch circuit 36 selects an output from theinterpolator 34 when the absolute value of the vertical component of themotion vector candidate 18 output from a motion vector searching circuit17 is larger than a certain threshold value. When this value is smallerthan the threshold value, the switch circuit 36 selects an output fromthe interpolator 35. With this operation, proper reference video signalsare output. According to another switching method, when the absolutevalue of the vertical component of the motion vector candidate 18 outputfrom the motion vector searching circuit 17 is large, an output from theinterpolator 34 is selected, whereas when the value is small, outputsfrom both the interpolators 34 and 35 are used as reference videosignals, and a correlation arithmetic operation between the two signalsis performed to select one of the outputs. This method is alsoeffective.

A video coding apparatus according to the third embodiment of thepresent invention will be described below.

Referring to FIG. 7, picture data input to an input terminal 001 istemporarily stored in an input buffer memory 100. The data is then readout, as partial picture data, from the input buffer memory 100 in unitsof partial regions, each constituted by a plurality of pixels, in theorder of to-be-coded pictures. Partial picture data read out from theinput buffer memory 100 is input to a motion vector detection circuit200. The motion vector detection circuit 200 obtains a partial picture,from pictures coded and reproduced in the past, which can efficientlycode the input data, and outputs a motion vector (address data)indicating the region data and position of the partial picture.

The partial picture data output from the input buffer memory 100 is alsoinput to a local coding circuit 300 together with the partial picturedata and the motion vector output from the motion vector detectioncircuit 200. The local coding circuit 300 codes either the partialpicture data output from the input buffer memory 100 or difference datarelative to the partial picture data designated by the motion vector. Inthis case, the coded data corresponding to the difference relative tothe region designated by the motion vector includes data obtained byvariable length coding of the motion vector.

The data coded by the local coding circuit 300 is input to a localdecoding circuit 400 to be decoded together with the partial picturedata output from the motion vector detection circuit 200. With thisoperation, a reproduced picture is obtained. In addition, if the data iscoded by using a motion vector, the decoded data is added to the partialpicture data output from the motion vector detection circuit 200 toobtain a reproduced picture. This reproduced picture data is input tothe motion vector detection circuit 200 and is temporarily stored tocode the next input picture data.

Operations of She motion vector detection circuit 200, the local codingcircuit 300, and the local decoding circuit 400 will be described indetail below.

In the motion vector detection circuit 200, data input from the inputbuffer memory 100 are sequentially written in picture memories (211 to214), in which picture data unnecessary to search for motion vectors arestored, under the control of a write control circuit 222. In thismanner, coded picture data stored in the picture memories (211 to 214)are sequentially read out in units of regions, starting from a pictureclose in time to the coded picture, by a read control circuit 221 and adata switching circuit 231. The data are then input to a differencecircuit 241. The difference circuit 241 calculates the differencesbetween the coded picture data and input data in units of regions.

An estimation circuit 242 sequentially compares the sums of differencesin units of regions to control the searching direction of the readcontrol circuit 221 in the picture memories. Every time a partial regionof a coded picture which is less different from the input partialpicture than the previously detected partial picture is detected, theestimation circuit 242 causes a vector register 243 to store addressdata indicating this region of the partial picture, thus obtaining apartial region of the coded picture which is closest to the inputpartial picture. In this manner, the address data indicating the partialregion of the coded picture which is least different from the inputpartial picture stored in the vector register 243 is input to a readcontrol circuit 223 and a switch circuit 232. As a result, thereproduced picture of coded data corresponding to the partial region ofthe coded picture is read out from one of reproduced picture memories(215 to 218), and is input to the local coding circuit 300 together withits address data.

According to this embodiment, in the local coding circuit 300, DCT(discrete cosine transformation) as one of orthogonal transformationschemes, quantization, and variable length coding are used as a codingmethod for a motion compensation error. In the local coding circuit 300,partial picture data output from the input buffer memory 100 is input toa difference circuit 311 so that the difference between the partialpicture data and partial picture data obtained by reproducing coded dataoutput from the motion vector detection circuit 200 is calculated. Aswitch circuit 312 sequentially switches and outputs difference picturedata input from the difference circuit 311 and partial picture datainput from the input buffer memory 100 in accordance with controlsignals input to a terminal 002.

A DCT circuit 320 sequentially frequency-converts partial data anddifference picture data sequentially output from the switch circuit 312,and outputs the resultant data. A quantizer 330 quantizes thefrequency-converted data output from the DCT circuit 320 with a presetquantization step size, and outputs the resultant data. An entropy coder340 codes the quantized data together with its quantization step sizeinformation and identification data indicating whether the data ispartial picture data or difference data. In addition, in coding ofdifference picture data, the entropy coder 340 performs variable lengthcoding of the data together with a motion vector corresponding to thepartial picture data output from the vector register 243 by usingHuffman codes or the like in accordance with the respective occurrenceprobabilities. If this identification code and the motion vector codeare combined to form one Huffman code, efficient coding can be realized.Furthermore, in this coding, with regard to picture data obtained byreproducing coded data in a region designated by a predetermined rule,or input picture data which differs from fixed data by a predeterminedvalue or less, if the number of such successive partial pictures iscoded by variable length coding, the coding efficiency is furtherimproved.

An amount-of-bits estimation circuit 351 compares the amount of bits ofcoded data, obtained by coding the difference between a partial pictureto be coded and a picture in a region designated by a motion vector,with that of coded data obtained by directly coding input data by DCT,and outputs coded data with higher coding efficiency so an output buffer360 and the local decoding circuit 400.

The output buffer 360 temporarily stores this coded data for adjustmentof the output data rate, and controls a quantization step size used bythe quantizer 330 and a coding table used by the entropy coder 340.

In the local decoding circuit 400, the partial picture data output fromthe motion vector detection circuit 200 is temporarily stored in a datamemory 441, and the coded data output from the amount-of-bits estimationcircuit 351 is input to a variable length decoder 410, so that themotion vector including the identification code and the quantized databefore coding are decoded. This decoded quantized data is input to aninverse quantizer 420 to be converted (inversely quantized) into atypical value having a dynamic range before quantization. The convertedvalue is input to an adder 450. The data inversely quantized by theinverse quantizer 420 is input to an inverse DCT circuit 430 so that thepartial picture or the difference picture data is reproduced. A gatecircuit 442 permits the passage of the partial picture data output fromthe data memory 441 if it is determined on the basis of theidentification code decoded by the variable length decoder 410 that thereproduced data output from the inverse DCT circuit 430 is differencepicture data. Otherwise, the gate circuit 442 sets the output data to be"0". The gate circuit 442 outputs the resultant data to the adder 450.

If the picture data subjected to inverse DCT in this manner correspondsto a coded difference picture, the data is added to the partial picturedata output from the motion vector detection circuit 200. Otherwise, areproduced picture is obtained by the adder 450 without using thepartial picture data output from the motion vector detection circuit200. This reproduced picture data is input to the motion vectordetection circuit 200 to be temporarily stored so as to be used forcoding the next input picture data.

FIG. 8 shows the fourth embodiment of the present invention. Thisembodiment is different from the previous embodiment in that a datamemory 460 for storing quantized data is used in place of the variablelength decoder 410 included in the decoding circuit 400 shown in FIG. 7.In this case, data obtained by performing DCT and quantization ofdifference picture data based on the difference between the partialpicture data output from an input buffer memory 100 and partial picturedesignated by a corresponding motion vector are temporarily stored inthe data memory 460. Thereafter, picture data corresponding to codeddata selected by a amount-of-bits estimation circuit 352 and output froman output buffer 360 is output to an inverse quantizer 420. If thispicture data is difference picture data, the data is added to partialpicture data output from a data memory 441 by an adder 450 to obtain areproduced picture, as in the embodiment shown in FIG. 7.

In this embodiment, since no arithmetic operation is required fordecoding, the processing time is shorter than that in the embodimentshown in FIG. 7.

FIG. 9 shows the fifth embodiment of the present invention, in whichpart of a decoding circuit 400 is used as a motion vector detectioncircuit. Similar to the above-described embodiments, in this embodiment,a motion vector detection circuit 200 reads out partial picture data ofdecoded and reproduced picture data through a switch circuit 232 underthe control of a read control circuit 224, and outputs a motion vector(address data) indicating the position of the corresponding region.

Referring to FIG. 9, similar to the embodiments shown in FIGS. 7 and 8,picture data input to an input terminal 001 are temporarily stored in aninput buffer memory 100. The data are then read out from the inputbuffer 100 in units of regions, each consisting of a plurality ofpixels, in the order of to-be-coded pictures, and are input to a localcoding circuit 300. In response to a control signal input to an inputterminal 002, DCT, quantization, and coding of partial picture dataoutput from the input buffer memory 100 are performed withoutcalculating the difference between the partial picture data and outputdata from the motion vector detection circuit 200, which is inputthrough a gate circuit 313, in the same manner as in the embodimentsshown in FIGS. 7 and 8. The quantized data is stored in a data memory460, and the coded data and the amount-of-bits data are stored in anamount-of-bits estimation circuit 353. Subsequently, a different controlsignal is input to the input terminal 002 to calculate the differencebetween the partial picture output from the input buffer memory 100 andthe partial picture data output from the motion vector detection circuit200, and DCT, quantization, and variable length coding of the differencedata are performed in the same manner as in the embodiments shown inFIGS. 7 and 8.

The amount-of-bits estimation circuit 353 estimates coded data from anentropy coder 340 and controls the read control circuit 224 inaccordance with the estimation result. With this operation, every timethe amount-of-bits estimation circuit 353 detects a region in which theamount of bits can be further reduced, the circuit 353 causes the readcontrol circuit 224 to store corresponding coded data. In addition, thecircuit 353 causes a data memory 441 to store partial picture dataoutput from the motion vector detection circuit 200, and causes the datamemory 460 to store data obtained by performing DCT and quantization ofa corresponding difference picture. In this manner, coded data havingthe minimum amount of nits is finally output to an output buffer 360.Quantized data corresponding to this coded data is reproduced by thelocal decoding circuit 400 in the same manner as in the embodimentsshown in FIGS. 7 and 8. The reproduced data is input to the motionvector detection circuit 200 to be temporarily stored so as to be usedfor coding the next input picture data.

In the embodiments shown in FIGS. 7 and 8, a more accurate motion vectoris obtained as an optimum motion vector. In contrast to this, in theembodiment shown in FIG. 9, a motion vector realizing the maximum codingefficiency is obtained.

FIG. 10 shows a reproduction circuit for reproducing coded data in theembodiments shown in FIGS. 7 to 9. In this circuit, a variable lengthdecoder 510 decodes coded data input from an input terminal 004 toreproduce quantization step size information, motion vector data(including an identification code indicating whether the reproduced datais difference picture data relative to a partial picture designated bythe motion vector), and quantized data. The quantized data is reproducedthrough an inverse quantizer 520 and an inverse DCT circuit 530. If thisreproduced data is difference picture data relative to the partialpicture designated by the motion vector, a read control circuit 621reads out the corresponding partial picture data from one of reproducedpicture memories 611 to 614, outputs the data from a motion vectordetection circuit 600, and inputs it to a local decoding circuit 500.This partial picture data is added to the difference picture data by anadder 550 through a gate circuit 540 to form reproduced picture data.The reproduced picture data is input to the motion vector detectioncircuit 600 to be temporarily stored so as to be used for reproductionof the next input coded data. In addition, the reproduced picture datais input to an output buffer 560 to be output in the original pictureorder.

According to the above embodiment, it is possible to subject to aninterlaced video an predictive coding based on a motion compensationmethod with good precision, without a motion magnitude detection withrespect to the reference picture. Accordingly, the video codingapparatus can be simply constructed, since no motion magnitude detectioncircuit is required. Further, the motion compensation prediction codingcan be applied to a coding sequence by which a motion magnitudedetection so as to correspond to a special reproduction performed by aVTR, for example, cannot be performed.

Motion vector searching operations to be performed in the estimationcircuits 242 and the read control circuits 221 in FIGS. 7 and 8 and inthe amount-of-bits estimation circuit 353 and the read control circuit224 in FIG. 9 will be described below.

FIGS. 11 to 16 respectively show examples of motion vector searchingprocessing in the present invention. Referring to FIGS. 11 to 16, eachof reference symbols s1, s2, . . . , s6 denotes one frame or one fieldpicture, and each of reference numerals 101, 102, . . . , 120 denotesone pixel or a plurality of pixels in the horizontal or verticaldirection.

In the motion vector searching operation shown in FIG. 11, in searchingfor a partial picture to be coded (e.g., s4-104), all the pixels (101 to120) of the coded picture s3 close in time to the to-be-coded pictureare searched, and the search range (area) in the coded picture s2remoter in time from the to-be-coded picture than the coded picture s3is limited to a certain range (e.g., 105 to 115) on the basis of anoptimum motion vector obtained upon this searching operation, i.e., amotion vector realizing the highest coding efficiency or the mostaccurate motion vector (e.g., s3-107).

In a searching operation in the coded picture s2 which is remoter intime from the to-be-coded picture, an optimum motion vector (e.g.,s2-109 or s3-107) is obtained in addition to the previously obtainedoptimum motion vector (e.g., s3-107).

Subsequently, the difference between a picture in the region designatedby the obtained optimum motion vector (e.g., s2-107) and the partialpicture to be coded (e.g., s4-104), i.e., a motion compensation error,is obtained, and the optimum motion vector and the motion compensationerror are coded.

The motion vector searching operations shown in FIGS. 12 to 14 aresuitable for a case wherein a picture (e.g., s3) close in time to ato-be-coded picture (e.g., s4) is coded by using a motion vector betweenthis picture (s3) and a picture (e.g., s1) which is remoter in time fromthe to-be-coded picture. In this case, since a motion vector between apartial picture (s4-104) of the to-be-coded picture and the picture (s3)close in time thereto can be predicted, the search range in the picture(s3) close in time to the to-be-coded picture is limited to, e.g., therange between partial regions 103 and 112. In addition, if a motionvector realizing high coding efficiency is obtained between theto-be-coded picture (s4) and the picture (s3) close in time thereto, therange of regions as vector candidates between the partial region(s4-104) of the to-be-coded picture and a picture (e.g., s2) which isremote in time therefrom can be limited to a narrow range, e.g., therange between partial regions 107 to 110, as shown in FIGS. 13 and 14,by using a motion vector between a partial region (e.g., s1-110) of apicture remoter in time from the to-be-coded picture than a partialregion (e.g., s3-107) closer in time to the to-be-coded picture, whichis designated by the motion vector, and the partial region (s4-104) ofthe to-be-coded picture.

The motion vector searching operation shown in FIG. 15 is suitable for acase wherein since the motion between pictures is large, no motionvector candidate exists even in the picture s3 close in time to theto-be-coded picture s4, or a case wherein since a motion vector (e.g.,s3-116 to s4-104) obtained as a candidate in the picture s3 close intime to the to-be-coded picture is very large, it can be predicted thatno motion vector realizing high coding efficiency exists in the pictures2 remote in time from the to-be-coded picture.

In such a case, a search for a motion vector is not performed in thepicture s2 which is remote in time from the to-be-coded picture, or thesearch range can be further limited to, e.g., the range between partialregions 116 and 120. With this operation, a motion vector realizing highcoding efficiency can be obtained with a small arithmetic operationamount required for a motion vector searching operation.

The motion vector searching operation shown in FIG. 16 is suitable for acase wherein a motion vector (e.g., s3-107 to S4-104) obtained betweenthe partial picture s4-104 of the to-be-coded picture and the picture s3close in time thereto is relatively large, or a case wherein no propermotion vector can be obtained. In such a case, a search for a motionvector in the picture s2 remote in time from the to-be-coded picture isnot performed. A motion vector searching operation in the picture s2remote in time from the to-be-coded picture, however, is performed bylimiting the search range in the picture s2 to the range between partialregions near the position of the partial picture of the to-be-codedpicture, e.g., the range between the partial regions 103 and 105, onlywhen the motion vector between the to-be-coded picture and the pictures3 close in time thereto is small.

If the motion between pictures close in time to each other is large,since a blur caused by the motion exists even in one picture obtained bynormal photography using a camera, it is difficult to producedifferences in units of 1/2 pixels in motion compensation between thepictures. That is, in such a case, even if a motion vector is obtainedbetween the to-be-coded picture and a picture remoter in time therefrom,the coding efficiency cannot be improved much in spite of an increase inarithmetic operation amount for the searching operation. According tothe example shown in FIG. 16, in the case wherein the motion betweenpictures is large, since a motion vector between the to-be-coded pictureand a picture remote in time therefrom is not coded, the number of typesof coding is decreased, and the coding efficiency is further improved.

According to the above embodiment, an accurate motion compensation and ahigh coding efficiency can be attained notwithstanding that an amount ofarithmetic operation required for the motion vector searching isdecreased.

Note that as a coding method, the present invention can employ any oneof the following methods: intra-frame coding, intra-field coding,inter-frame difference coding, and inter-field difference coding, andcan use such a method in combination with another coding scheme. Inaddition, the motion vector searching method of the present inventioncan be applied to a case wherein pictures coded in advance at intervalsof an arbitrary number of pictures are used as reference pictures, and amotion vector in a picture between the reference pictures is obtained.Therefore, a search for a motion vector can be performed by usingpictures before and after a to-be-coded picture.

A video coding apparatus according to the sixth embodiment of thepresent invention will be described below with reference to FIG. 17.

In this embodiment, a coding algorithm basically employs a motioncompensation and DCT scheme, and the input picture format is aninterlace format such as a picture format defined by CCIR Rec. 601/525.FIG. 18 shows this picture format. Referring to FIG. 18, referencesymbol Y denotes a brightness signal; and Cr and Cb, color signals,respectively. The number of pixels of each signal per field is alsoshown in FIG. 18.

Coding units are arranged in a hierarchy. That is, as shown in FIG. 19,"block", "macroblock", "slice", "picture", "group of pictures" (notshown), and "sequence" (not shown) are hierarchically arranged in theorder named. A block is constituted by 8×8 pixels. DCT is performed inunits of blocks. A macroblock is constituted by a total of four blocks,i.e., two Y blocks, one Cr block, and one Cb block. Motion compensationand selection of the respective coding modes are performed in units ofmacroblocks.

A group of pictures (GOP) has the following arrangement. Pictures areroughly classified into I, P, and B pictures depending on the types ofmodes allowed as prediction modes and selected in units of macroblocks.The modes include four modes (to be described in detail later), i.e., anintra-field prediction mode (Intra), a forward prediction mode (Inter:including motion compensation), a backward prediction mode, and abidirectional interpolation prediction mode. As shown in Table 1,pictures are classified into three types, i.e., I, P, and B picturesdepending on the types of prediction modes to be used. These pictures I,P, and B are coded in accordance with quantization step sizes determinedby a relation of I<P<B. Namely, the picture I is coded with aquantization step size smaller than in the picture P, and the picture Pwith a smaller quantization step size than in the picture B. The ratioof the amounts of bits of these coded pictures is previously determined.

                  TABLE 1                                                         ______________________________________                                        Picture Type Macroblock Mode which can be selected                            ______________________________________                                        I picture    intra-field prediction mode                                      P picture    intra-field prediction mode                                                   forward prediction mode                                          B picture    intra-field prediction mode                                                   forward prediction mode                                                       backward prediction mode                                                      bidirectional interpolation prediction mode                      ______________________________________                                    

This embodiment employs an interlace format as a coding picture format.In this format, since different prediction methods are used even forpictures of the same type depending on their positions in GOP, thepictures can be further classified.

The arrangement of GOP and the manner of predicting pictures fromspecific pictures will be described below with reference to FIGS. 20Aand 20B.

As shown in FIGS. 20A and 20B, GOP is defined by a group of pictures,starting from the B0 picture preceding one of the I pictures, which areperiodically arranged as entry points for random access and specialreproduction, and ending at the P2 picture located before the next Ipicture. The I pictures appear only in even fields. In addition, Table 2and FIGS. 21A and 21B show the manner of predicting the respectivepictures from specific pictures.

                  TABLE 2                                                         ______________________________________                                        Picture Type                                                                          Prediction Method                                                     ______________________________________                                        I       no prediction                                                         P0      inter-field forward prediction based on I picture                     P1      forward prediction (inter-field adaptive prediction) based on                 past I and P0 (or P1 and P2) pictures                                 P2      selection from forward prediction schemes based on past I                     and P0 (or P1 and P2 pictures), and P1 pictures                               forward prediction based on past P1 and P2 (or I and P0)                      pictures                                                                      backward prediction based on future P1 and P2 (or I and                       P0) pictures                                                          B0 to B3                                                                              selection from bidirectional interpolation prediction                         schemes based on past and future P1 and P2 (or I and P0)                      pictures (inter-field adaptive prediction in either                   ______________________________________                                                scheme)                                                           

There are two prediction methods: an inter-field prediction method inwhich prediction is performed only from even fields; and aninter-field/inter-frame adaptive prediction method in which predictionis adaptively performed from even and odd fields in units of fields.Referring to FIGS. 21A and 21B, each arrow indicates that inter-fieldprediction is performed, and each symbol consisting of one arrow and twolines combined with each other by the arrow indicates thatinter-field/inter-frame adaptive prediction is performed. FIG. 20B showsthe coding sequence of the respective pictures within one GOP.

In consideration of the above-described points, the video codingapparatus shown in FIG. 17 will be described below.

Referring to FIG. 17, an interlaced video signal is input to an inputterminal 700. Successive components of the input video signal whichcorrespond to eight fields are stored in field memories 701. The videosignal in the field memories 701 is supplied to a first motion vectordetector 710, and motion vector detection is performed by a telescopicsearch (to be described later) using an original motion picture with aprecision of one pixel. This processing is the first step of motioncompensation.

Subsequently, in preprocessing for the second step of motioncompensation, the motion vector obtained by the motion vector detector710 using the original motion picture is refined by searching a wholerange of q1 pixels around the target pixel using local decoded signalsstored in field memories 708 in a local decoder loop.

In the second step of motion compensation, motion vector detection isperformed with a precision of 1/2 pixels by the field memories 708, aninter-field/inter-frame adaptive prediction circuit 709, and a secondmotion vector detector 711 using the local decoded signals. As a result,a prediction signal is generated by the prediction circuit 709. Thisprediction signal is input to a subtracter 702, and the differencebetween the prediction signal and the video signal from the fieldmemories 701 is calculated. The difference is then output as apredictive error signal.

Discrete cosine transformation of the predictive error signal isperformed by a DCT circuit 703 to obtain DCT coefficient data. The DOTcoefficient data is quantized by a quantizer 704 and is subjected toadaptive scanning. The resultant data is then input to a multiplexer 714through a two-dimensional variable length coding circuit 712. Thequantized DCT coefficient data is locally decoded through an inversequantizer 705 and an inverse DCT circuit 706, and only the I and Ppictures are written in the field memories 708. The number of fieldmemories 708 to be prepared corresponds to four fields required foradaptive prediction.

In the multiplexer 714, the DCT coefficient data, a motion vector fromthe second motion vector detector 711 (to be described later), andadditional information such as macroblock size data and step size datafrom a coding controller 717 are multiplexed. The informationmultiplexed by the multiplexer 714 is transmitted at a constanttransmission rate through a buffer 715 to be output to a storage devicesuch as a VTR or a recording device.

The coding controller 717 controls the quantization step size in thequantizer 704 on the basis of the buffer capacity of the buffer 715 andan intra-macroblock activity (I picture) calculated by an activitycalculator 716 or the intra-macroblock activity (P or B picture) of asignal before quantization in the same mode, located immediately beforethe current picture.

The arrangement of a video decoding apparatus corresponding to the videocoding apparatus shown in FIG. 17 will be described below with referenceto FIG. 22.

A signal read out from a recording device is input to an input terminal800 and is temporarily stored in a buffer 801. The signal read out fromthe buffer 801 is input to a demultiplexer/variable length decodingcircuit 802. As a result, the additional information such as DCTcoefficient data, motion vector data, and step size data multiplexed bythe multiplexer 714 shown in FIG. 17 is separated from the signal and isdecoded.

More specifically, the DCT coefficient data is subjected totwo-dimensional variable length decoding and scan conversion. Theresultant data is then subjected to local decoding through an inversequantizer 803 and an inverse DCT circuit 804, similar to the localdecoding loop in the video coding apparatus shown in FIG. 17. Thedecoded data is input to an adaptive prediction circuit 807 through anadder 805 and field memories 806 corresponding to four fields. Since themotion vector data is transmitted as difference data, as will bedescribed later, the data is subjected to variable length decoding andis subsequently restored to the original data. The restored data is thensupplied to the adaptive prediction circuit 807. The adaptive predictioncircuit 807 generates a prediction signal. When this prediction signaland the local decoded signal from the inverse DCT circuit 904 are addedtogether by the adder 805, the original video signal is extractedthrough the field memories 806. The outputs from the field memories 806are supplied to a picture display circuit (not shown).

In a picture display operation, the decoding sequence and the displaysequence are different from each other, and the B picture need not bestored in the field memories because it is not used for prediction. Forthese reasons, switching is performed such that the I and P pictures areoutput from the field memories 806, while the B picture is directlyoutput while it is decoded.

Motion compensation and motion vector detection in this embodiment willbe described in detail below.

The motion compensation is performed in units of macroblocks, asdescribed above. The motion vector detection includes motion vectordetection performed in the first motion vector detection circuit 710 bynormal block matching with a precision of one pixel, and motion vectordetection performed in the second motion vector detection circuit 711,which searches for motion vectors at points obtained by performingadaptive spatial-temporal interpolation with respect to pixel positionsset, with a precision of 1/2 pixels, around a reference picturedesignated by the motion vector with a precision of one pixel. A methodof performing spatial-temporal interpolation will be described in detaillater.

The motion vector detection in the first motion vector detection circuit710 is performed to search for an optimum motion vector by searching allthe pixels of each field with a precision of one pixel using each fieldpicture of an input video. A searching operation between fields spacedapart from each other is performed by using telescopic search processing(refer to Simulation Model No. 3). With regard to field pictures, aplurality of paths can be considered as search paths between fields. Inthis embodiment, search paths are determined in accordance with thefollowing rules:

1) A search between in-phase fields is performed by using only in-phasefields.

2) A search between reverse phase fields is performed by using onlyin-phase fields if possible.

A search between reverse phase fields must be included in search pathsonly once. In this embodiment, as indicated by the telescopic searchorder shown in FIG. 24, fields having difference phases are searchedfirst. For example, when a motion vector between the I and P2 picturesis to be detected, search processing is performed in the order ofI→P0→B1→B3→P2 but is not performed in the order of I→B0→B2→P1→P2. Notethat the hatched portion in FIG. 24 indicates a search range. Thistelescopic search processing is independently performed in the forwardand backward directions. In addition, the search range between adjacentfields is defined by horizontal ±15 pixels and vertical ±7 pixels.

The motion vector detection in the second motion vector detectioncircuit 711 is performed by using pictures stored in the field memories708 in the local decoding loop as reference pictures. In preprocessingfor this motion vector detection, the motion vector is refined bysearing a whole range of ±1 pixels around the reference picturedesignated by the motion vector obtained by the first motion vectordetection circuit 710. In the main process of the motion vectordetection in the second motion vector detection circuit 711, the valuesof predictive error power of all the prediction signal candidatesgenerated, by a method to be described later, at positions with aprecision of 1/2 pixels around the reference picture designated by themotion vector obtained by the refining process are estimated andcompared with each other, thereby selecting an optimum prediction signalcandidate.

Note that motion vector detection is not performed with respect to acolor signal, but motion compensation is performed on the basis of amotion vector obtained with respect to a brightness signal.

Processing to be performed by the inter-field/inter-frame adaptiveprediction circuit 709 shown in FIG. 17 will be described below withreference to FIG. 23 which is a block circuit showing part of theinter-field/inter-frame adaptive prediction circuit 709.

As described above, in the second step of motion compensation, searchingis performed in a range of 1/2 pixels around the reference picturedesignated by the motion vector obtained by the first motion vectordetection circuit 710. FIG. 25B shows the state of this processing. Thisinter-field/inter-frame adaptive prediction is performed with respect toeach of the P1, P2, and B pictures by using, e.g., a pair of even andodd fields #1 and #2 immediately before a to-be-coded picture (field tobe coded) as reference pictures (reference fields).

Assume that optimum points (indicated by "∘") at the reference fields #1and #2 are respectively obtained by the motion vector detection circuit710 using motion vectors V1 and V2 in the first step of motioncompensation shown in FIG. 25A. In the second step of motioncompensation shown in FIG. 25B, a plurality of prediction signalcandidates are obtained by performing spatial-temporal filtering ofreference pictures in ranges of 1/2 pixels around the two optimum pointsdesignated by the motion vectors V1 and V2 in theinter-field/inter-frame adaptive prediction circuit 709. Subsequently, asearch for an optimum motion vector is performed by the motion vectordetection circuit 711 on the basis of the prediction signal candidatesand the motion vectors detected by the motion vector detection circuit710. In this case, prediction signal candidates are generated in twomodes, i.e., a field interpolation mode and a frame interpolation mode.

In the filed interpolation mode, prediction signal candidates aregenerated by using only a spatial filter. of time and spatial filters.That is, the pixel values of pixels A to C in FIG. 25B are obtainedaccording to the following equations:

    A=(O+D)/2

    B=(O+D+E+F)/4

    C=(O+F)2

In this field interpolation mode, there are nine search points forprediction signal candidates for even and odd fields each, i.e., a totalof 18 search points.

In contrast to this, in the frame interpolation mode, prediction signalcandidates are formed by performing spatial-temporal filtering ofsignals obtained by performing motion compensation for the respectivefields with a precision of one pixel. For example, the pixel values ofthe pixels A to C in FIG. 25B are obtained according to the followingequations:

    A=G/2+(O+D)/4

    B=G/2+(O+D+E+F)/8

    C=G/2+(O+F)1/4

In this case, a field for providing data at a pixel position with aprecision of 1/2 pixels will be referred to as a reference field. Inthis frame interpolation mode, although each of even and odd searchfields has nine search points for prediction signal candidates, sinceprediction signals at the positions of pixels O coincide with eachother, a total of 17 search points for prediction signal candidatesexist.

In the second step of motion compensation, searching of predictionsignal candidates at 35 search points, the sum of the search points inthe two modes, is performed, and a prediction signal candidate havingthe minimum predictive error is determined as a prediction signal. If,however, the directions of motion vectors between two fields greatlydeviate from each other, the frame interpolation mode is not selected(to be described in detail later).

Information indicating the selection of the field interpolation mode orthe frame interpolation mode and information indicating a specific fieldselected as a reference field used for the field interpolation mode orthe frame interpolation mode are transmitted by one-bit flags. Note thatprediction by means of fields immediately before the P0 and P2 picturesis performed by only a mode in which the field interpolation mode isadapted for a single field. In this case, a mode selection flag is nottransmitted.

Although the above description is associated with the P picture, almostthe same processing applies to the B picture. With regard to the Bpicture, however, only fields which are in phase with a field to becoded are selected as search fields in the field interpolation mode andas reference fields in the frame interpolation mode. It is apparent thatin this case, a flag indicating the selection of a specific field is nottransmitted.

The manner of realizing the above principle on hardware in practice willbe described below with reference to the block diagram of FIG. 23.

Of the video signals output from the field memories 708 corresponding tofour fields, shown in FIG. 17, signal components designated by motionvectors obtained by preprocessing for the second motion vector detectionare stored in cache memories 901a, 901b, 902a, and 902b. In accordancewith control signals from the second motion vector detection circuit711, a switch circuit 900 distributes outputs from the cache memories901a and 901b to a time filter 903 and a spatial filter 905, and alsodistributes outputs from the cache memories 902a and 902b to a timefilter 904 and a spatial filter 906.

A selector 907 selects either a signal passing through only the spatialfilter 905 or a signal passing through both the spatial and time filters905 and 903 in accordance with a control signal output from the secondmotion vector detection circuit 711 which instructs whether to selectthe field interpolation mode or the frame interpolation mode. A selector908 has the same function as that of the selector 907. Assume that asignal representing a pixel G shown in FIG. 25B is input from the switchcircuit 900 to the time filter 903, and a signal representing a pixel Bshown in FIG. 25B is output from the spatial filter 905. In this case, asignal obtained by averaging the signals representing the pixels G andB, i.e., time-space filtering, can be obtained as an output from thetime filter 903. Therefore, an output from the spatial filter 905 isselected in the field interpolation mode, and an output from the timefilter 903 is selected in the frame interpolation mode.

Outputs from the selectors 907 and 908 are directly input to a selector911. At the same time, the outputs are added together by an adder 909,and the product is divided by 2 by a divider 910. The resultant signalis then input to the selector 911. The selector 1011 selectively outputsthese three inputs, i.e., the signal predicted by using the referencefields 1 #1 and #2 and output from the selector 907, the signalpredicted by suing the reference fields #3 and #4 and output from theselector 908, and the signal predicted by using the reference fields #1and #4 and output from the divider 910, as prediction signal candidates,to the second motion vector detection circuit 711. Of these 35prediction signal candidates, a prediction signal candidate having theminimum predictive error is determined as a prediction signal by themotion vector detection circuit 711 in the above-described manner. Themotion vector detection circuit 711 then sends information indicatingthis determination to the inter-field/inter-frame adaptive predictioncircuit 709. With this operation, the inter-field/inter-frame adaptiveprediction circuit 709 outputs the prediction signal designated by themotion vector detection circuit 711 to the subtracter 702 and an adder707.

The manner in which a motion vector from the second motion vectordetection circuit 711 is coded to be transmitted will be describedbelow.

A motion vector in the field interpolation mode or a motion vector onthe reference field side in the frame interpolation mode is coded as areference vector by a variable length coding circuit 713. The referencevector is then transmitted to the multiplexer 714. This motion vector(reference vector) has a precision of 1/2 pixels. If the frameinterpolation mode is selected, the difference between a motion vectorat a field which is not a reference field and a motion vector obtainedby converting a motion vector (reference vector) in the reference fieldinto a value at the other field is coded and transmitted. That is, thedifference between a point nearest to the point at which the extendedline of the motion vector in the reference field crosses the field whichis not the reference field and the motion vector is transmitted with aprecision of one pixel. If the difference between the directions ofthese two motion vectors exceeds a range of q1, the frame interpolationmode is not selected, assuming that the frame interpolation mode is noteffective unless the directions of the two motion vectors are close toeach other.

FIG. 26 shows a detailed example of how the above-mentioned motionvector is transmitted, in which the difference (indicated by the arrowextending in the vertical direction in FIG. 26) between a motion vectorwith a precision of one pixel (indicated by the arrow on the lower sidein FIG. 26) in the reference field #2 and a point "" nearest to a point"Δ" at which a motion vector with a precision of 1/2 pixels (indicatedby the arrow on the upper side in FIG. 26) in the reference field #1crosses the reference field #2 is transmitted with a precision of onepixel. In the case shown in FIG. 26, the difference is -1. With thisoperation, the information amount of a motion vector can be savedwithout causing a deterioration in prediction performance.

Motion compensation for color signals will be described next.

As shown in FIG. 19, in one macroblock, the brightness signal Y and thecolor signals Cr and Cb have the same number of pixels in the verticaldirection, but the number of each color signal is 1/2 that of thebrightness signal Y in the horizontal direction. For this reason, when amotion vector obtained from a brightness signal is to be applied to acolor signal, the horizontal components of the motion vector is reducedto 1/2. When the motion vector is divided by 2, fractions are rounded to"0". This equally applies to both the field interpolation mode and theframe interpolation mode.

FIGS. 27A and 27B respectively show detailed examples of how the motionvector of a color signal is obtained from the motion vector of abrightness signal in the field interpolation mode and the frameinterpolation mode. Referring to FIGS. 27A and 27B, the broken circlesindicate pixel positions where no color signals all exist. Assume thatthe pixel position obtained in the first step is indicated by the circleat the central position, and the point obtained in the second step isindicated by "×". Assume that in either mode, the horizontal coordinatevalue of an origin is larger than that of the circle at the centralposition. In the field interpolation mode shown in FIG. 27A, if themotion vector of a brightness signal is obtained at the position of thepoint "×", the 1/4-pixel-precision component of a color signal isrounded in the A direction to form an interpolated pixel Δ. Thisinterpolated pixel Δ is formed by

    Δ=1/4(A+B+C+D)

Similarly, in the frame interpolation mode shown in FIG. 27B, aninterpolated pixel ² in the reference field #1 is formed by

    Δ=1/4(E+F+G+H)

In the reference field #2, the 1/2-pixel-precision component of a colorsignal is rounded in the A direction, and a pixel at a position I isused as an interpolated pixel. That is, in the cases shown in FIGS. 27Aand 27B, the value of the interpolate pixel Δ is obtained by

    I×1/2+(E+F+G+H)×1/8

According to the above embodiment, a motion compensation predictionsuitable for an interlaced video by effectively using a number of fieldscan be realized with high effectivity and precision.

Rate control will be described next with reference to the flow chartsshown in FIGS. 28 and 29. The rate control is performed in the followingthree processes:

(1) allocating an amount of bits (a bit rate) to N pictures from the Ipicture to the B3 picture immediately before the next I picture;

(2) allocating and updating an amount of bits for each picture; and

(3) controlling the quantization step size in each picture by using avirtual buffer.

In this embodiment, an estimation amount called an activity iscalculated by the activity calculator 716, as described above, and thisestimation amount is used for rate control. The activity of the Ipicture is the sum total of the absolute values of values obtained bysubtracting an average value in a block from the respective pixelvalues. The activity of each of pictures of the other types is the sumtotal of the absolute values of DCT coefficients of motion compensationadaptive predictive error signals obtained through the subtracter 702and the DCT circuit 703. The activity of the I picture is calculated onefield before coding. The activities of the other pictures are calculatedin coding. The rate control of a given picture is performed by using theactivity of the same type of picture coded immediately before thecurrent picture.

The processes (1) to (3) of the above-described rate control will bedescribed in detail below with reference to the flow charts shown inFIGS. 28 and 29.

(1) Bit Rate Allocation in Units of N Pictures (Step S1)

Bit rate control is performed such that the amount of bits of N picturesfrom the I picture to the B picture immediately before the next Ipicture approaches a fixed value CAG (constant-allocate-gop). An excessor shortage of the amount of bits obtained by this control is carriedover to the amount of bits allocated to next N pictures, as shown inFIG. 30. At the end of coding of N pictures, a difference LOBG(left-over-bits-gop) between an allocated amount of bits ABG(allocated-bits-gop) and an amount of bits GBG (generated-bits-gop) iscalculated according to the following equation (1):

    LOBG=ABG-GBG                                               (1)

An amount of bits obtained by adding the fixed allocated amount of bitsCAG to the excess or shortage LOBG of amount of bits according to thefollowing equation (2) is allocated to the next N pictures:

    ABG=CAG+LOBG                                               (2)

(2) Allocation of Amount of Bits to Each Picture

An amount of bits allocated to each picture is determined to satisfy theabove-described conditions in accordance with the following rules (I)and (II):

(I) When the ratios of quantization step sizes Q·I, Q·P, and Q·B of theI, P1, P2, and B pictures are set according to the following equation(3), high coding efficiency is ensured, and no deterioration in picturequality occurs:

    Q·I:Q·P:Q·B=1:αQO:αQ(3)

where αQO and αQ are constants. The ratio of the amounts of bitsallocated to the respective pictures is updated such that the ratio ofthe quantization step sizes coincide with the ratio defined by equation(3).

(II) Excess bits of coded pictures of the N pictures are carried overfor amount-of-bits allocation to non-coded pictures in the N pictures,and allocated amounts of bits are determined in units of pictures suchthat the amounts of bits are allocated at the ratio defined by the rule(I).

The process of amount-of-bits allocation will be described in detailbelow.

(2-1) Allocation of Amount of Bits to I Picture (Step S3)

An allocated amount of bits AB·I (allocate-bits-I) of the first Ipicture in a sequence is determined on the basis of an activity A·I(activity-I) of the I picture, calculated in step S2 in FIG. 22,according to the following equation (4) which is set such that theamount of bits is not too large, and the quantization step size of the Ipicture is not extremely smaller than that of the P picture,

    AB·I=(C1*A·I+C2)*CAG                     (4)

where C1 and C2 are constants.

The allocated amount of bits of each other I picture is determinedimmediately before coding of the I picture. Based on an amount of bitsobtained by correcting the amount of bits of the immediately preceding Ipicture using an activity, the average quantization step size of theimmediately preceding I picture is compared with the averagequantization step size of the immediately preceding P1 and P2 pictures.If the quantization step size of the I picture is larger, the allocatedamount of bits of the I picture is increased, and vice versa accordingthe following formula (5): ##EQU1## where DQ (difference qscale) is thequantization step size difference, AQP (averaged qscale previans) is theimmediately preceding average quantization step size, GBP (generatedbits previous) is the immediately preceding amount of bits, AQP(averaged qscale previans) is the immediately preceding activity, C5 isa constant equal to or larger than 1, C6 is a constant equal to orsmaller than 1, and f5 and f6 are functions using a difference DQ·I·P12between the quantization step sizes of the I picture and the P1 and P2pictures as a parameter. For example, the functions f5 and f6 aredefined by the following equations (6): ##EQU2##

As the allocated amount of bits of the I picture is updated in theabove-described manner, the ratio of the quantization step sizes of theI picture and the P1 and P2 pictures approaches an optimum value, thusensuring high coding efficiency.

If the allocated amount of bits determined in the above-described mannerexceeds 23% of CAG, the amount of bits is reduced to 23% of CAG. Thatis, ##EQU3##

(2-2) Allocation of Amount of Bits to P0 Picture

No allocated amount of bits is determined in advance with respect to theP0 picture. However, the amount of bits of the P0 picture is limited bythe rate control in the picture so as not to exceed 25% of the allocatedamount of bits of GOP, as will be described below.

(2-3) Allocation of Amounts of Bits to P1, P2, and B Pictures (Steps S8,S10, S12, S14, S16, and S18)

The allocated amounts of bits of the P1, P2, and B pictures aredetermined immediately before coding of the respective pictures in sucha manner that the ratio of allocated amounts of bits AR of the P1, P2,and B pictures is set to be AR·P1: AR·P2: AR·B, and the amount of bitsof the N pictures coincides with the allocated amount of bits. That is,

    RBG=ABG-GBG=AR·P1×RN·P1+AR·P2×RN.multidot.P2+AR·B×RN·B                 (8)

where GBG (generated-bits-gop) Is the amount of bits which has beengenerated in the N pictures, and RN (residual-num)·P1, PN·P2, and RN·Bare the numbers of P1, P2, and B pictures, of the N pictures, which havenot been coded yet. Generated amounts of bits satisfying this equationare calculated by the following equations, respectively: ##EQU4##

(2-4) Updating of Ratio of Allocated Amounts of Bits of P1, P2, and BPictures

The ratio of the allocated amounts of bits of the P1, P2, and B picturesis set to a certain initial value at the start of a sequence. This ratiois updated immediately before coding of the P1 picture as follows.

(2-4-1) Updating of Ratio of Allocated Code Amounts of P1 and P2Pictures

When the P1 and P2 pictures are quantized with the same quantizationstep size, the ratio of the activities and the ratio of the generatedamounts of bits have the following relationship:

    GB·P2/GB·P1=C3×A·P2/A·P1-C4(12)

where C3 and C4 are constants.

The ratio of the allocated amounts of bits of the P1 and P2 pictures isdetermined on the basis of this relationship as follows:

    AR·P2/AR·P1=C3×A·P2/A·P1-C4(13)

With this updating, the quantization step size of the P1 picture becomesalmost equal to that of the P2 picture, thus suppressing a deteriorationin picture quality caused when the quantization step size is increased.

(2-4-2) Updating of Ratio of Allocated Bit Rates of P1 and B Pictures

As shown in FIG. 31, Pi picture and those pictures of the B0, B1, B2,and B3 pictures which have quantization step sizes defined by 1:αQrelative to the quantization step size of the P1 picture are weighted,and the generated amounts of bits are averaged, and the allocatedamount-of-bits ratio is updated so that it coincides with the ratio ofthe generated amounts of bits of the P1 and B pictures.

A weighted average amount of bits WAGB(weighted-averaged-generated-bits)·B is calculated first on the basis ofthe weighted average, i.e., the average quantization step size, andgenerated amounts of bits of the B0, B1, 52, and B3 according to thefollowing formula (14): ##EQU5##

This value is an amount of bits obtained by averaging the generatedamounts of bits of the B0, B1, B2, and B3 pictures which arerespectively weighted by larger values as the deviation from the optimumquantization step size (the quantization step size of the P picture×αQ)is decreased. The ratio of the allocated amounts of bits of the P1 and Bpictures is updated according to the following equation (15) to coincidewith the ratio of the amount of bits of the P1 picture and the weightedaverage amount of bits of the B picture:

    AR·P1/AR·B=GB·P1/WAGB·B(15)

When the allocated amount-ob-bits ratio is updated in theabove-described manner, the ratio of the quantization step sizes of theP and B pictures approaches an optimum ratio, i.e., 1:αQ, therebyallowing optimum amount-of-bits allocation in terms of both codingefficiency and picture quality.

(3) Rate Control in Picture

In a picture, feedback control is performed in units of slices by usinga virtual buffer. The quantization step size of the first slice of the Ipicture is obtained on the basis of an allocated amount of bits and anactivity, whereas that of each of pictures of the other types isdetermined on the basis of the quantization step size of a picture codedin the past.

(3-1) Quantization Step Size of First Slice of Picture

The quantization step size of the first slice of the I picture isdetermined on the basis of an allocated amount of bits AB·I and a sumA·I of activities in the picture according to the following equation(16):

    Q·I(1)=C5/AB·I·A·I     (16)

The quantization step size of the first slice of the P0 picture isdetermined on the basis of a value obtained by multiplying the averagequantization step size of the I picture by a constant αQ0 according tothe following equation (17): ##EQU6##

The quantization step size of the first slice of the first P1 picture inthe N pictures is determined on the basis of the average quantizationstep size of the I picture according to the following equation (18):##EQU7##

The quantization step size of the first slice of each P1 picture otherthan the first P1 picture is determined on the basis of the averagequantization step size of the immediately preceding P1 picture accordingto the following equation (19): ##EQU8##

The quantization step size of the first slice of the P2 picture isdetermined on the basis of the average quantization step size of the P1picture according to the following equation (20), thus preventing adeterioration in picture quality caused when the difference between thequantization step sizes of the P1 and P2 pictures is large. ##EQU9##

The quantization step size of the first slice of the B0 picture isdetermined on the basis of a value obtained by multiplying the averagevalue of the quantization step sizes of the P1 and P2 pictures by αQaccording to the following equation (21) such that the ratio between thedetermined quantization step size and the quantization step sizes of theP1 and P2 pictures is optimized. ##EQU10##

The quantization step sizes of the first slices of the B1, B2, and B3pictures are determined on the basis of the quantization step sizes ofthe last slices of the B0, B1, and B2 pictures according to thefollowing equations (22):

    Q·B1(1)=Q·B0(NM)

    Q·B2(1)=Q·B1(NM)

    Q·B3(1)=Q·B2(NM)                         (22)

(3-2) Rate Control in I, P1, and P2 Pictures

The quantization step sizes of the I, P1, and P2 pictures are updated inunits of slices in a coding apparatus (identical to the apparatus shownin FIG. 17) 800 by a quantization step size updating circuit 803 inaccordance with the occupied amount of a virtual buffer 801 shown inFIG. 32.

Prior to coding of each picture, the buffer occupied amount is reset to"0". Code bits GB (slices) generated by the coding apparatus 1000 inunits of slices are stored in the buffer 1001, and allocated amount ofbits AB (slices) represented by the following equation (23) are read outfrom the buffer 1001 in units of slices. Note that the allocated amountsof bits are allocated in units of slices as follows. With regard to theI picture, each of amounts of bits allocated in units of pictures isdistributed among slices in proportion to the activities of therespective slices. With regard to the P1 and P2 pictures, each ofamounts of bits allocated in units of pictures is distributed amongslices in proportion to the activities of the slices of an immediatelypreceding picture of the same type at the same spatial positions. Theseamounts of bits are allocated in units of picture types by apicture-unit amount-of-bits allocation circuit 1002. ##EQU11##

A buffer occupied amount BC (buffer content) is monitored in units ofslices. If this buffer occupied amount BC is larger (or smaller) than athreshold value BT (buffer threshold) and is larger (or smaller) thanthe buffer occupied amount of the previous slice, a quantization stepsize Q is incremented by one (or decremented by one). Note that thequantization step size Q is limited to 1 to 31. The threshold value BTis defined by the following equation:

    BT=ABP/NM×(2/3)

The above description can be expressed as follows:

    ______________________________________                                        BC(0) = 0;                                                                           for(slice = 1; slice < NM; slice ++)                                          {BC(slice) = BC(slice - 1) + GB(slice) -                                      AB(slice);                                                                    if (BC(slice) > BT                                                            &&BC(slice) > BC(slice - 1)                                                   &&Q < 31)                                                                     Q + 1;                                                                        eise if (BC(slice) < -BT                                                      &&BC(slice) < BT(slice - 1)                                                   &&Q > 1)                                                                      Q - = 1;}                                                              ______________________________________                                    

In this manner, amounts of bits read out from the buffer in units ofslices are allocated in proportion to the activities of the respectiveslices, and a change in quantization step size is limited to a maximumof q1. In addition, the conditions for a change in quantization stepsize are made stricter than those in the conventional method. Therefore,the quantization step size is not greatly changed in units of slices,preventing a deterioration in picture quality.

Note that if the amount of bits in the I picture exceeds 25% of theallocated amount of bits of N pictures, all the coefficients areforcibly set to be "0" in the subsequent operation to prevent generationof codes.

(3-3) Rate Control in B Picture

In the B picture, the same control as that performed for the P1 and P2pictures is performed except for the following points.

(1) The quantization step size is updated in units of 10 slices.

(2) The execution of update processing is determined only by checkingwhether the absolute value of the buffer occupied amount exceeds athreshold value, but a comparison with the buffer occupied amount of theprevious slide is not performed.

The above description can be expressed as follows:

    ______________________________________                                        BC(0) = 0;                                                                           for (slice = 1; slice < NM; slice ++)                                         {BC(slice) = BC(slice - 1) + GB(slice) -                                      AB(slice);                                                                    if (slice %10 == 0){                                                          if (BC(slice) > BT&&Q < 31)                                                   Q + = 1;                                                                      else if (BC (slice) < - BT&&Q > 1)                                            Q - = 1;}}                                                             ______________________________________                                    

The quantization step size of the B picture is updated in units of 10slices, i.e., at a long period, and a change in quantization step sizeis limited to a maximum of q1. Therefore, the quantization step size ofthe B picture is kept to be a value close to the quantization step sizeof the first slice of the B0 picture, which is set to optimize thecoding efficiency, over a long period of time, thus realizing highcoding efficiency.

(3-4) Rate Control in P0 Picture

In the P0 picture, the quantization step size is updated in units ofslices in accordance with the occupied amount of the virtual buffer insuch a manner that the amount of bits does not exceed 25% of theallocated amount of bits of N pictures. A bit count B0B(buffer-out-bits) read out from the buffer is a value obtained bydividing 20% of the allocated amount of bits of N pictures by the numberof slices in the picture according to the following equation:

    B0B (slice)=ABG×0.20/NM                              (24)

The buffer occupied amount is monitored in units of slices. If thebuffer occupied amount exceeds a threshold value, the quantization stepsize is incremented by one. However, the quantization step size islimited to a maximum of 31. The threshold value is the same as theamount of bits taken out from the buffer. In addition, if the amount ofbits in the P0 picture exceeds 25% of the allocated amount of bits of Npictures, control is forcibly performed to prevent generation of codesfor all the subsequent macroblocks.

In the P0 picture, rate control is performed only in a special case,e.g., a case wherein the amount of bits is excessively increased. Inactual coding operations, such control is very rarely performed. In mostcases, the quantization step size of the P0 picture is kept equal to theaverage quantization step size of the I picture, i.e., the set value ofthe first slice of the P0 picture. Therefore, the quantization step sizeof the P0 picture is not greatly changed as compared with the I picture,preventing a deterioration in picture quality.

As described above, since rate control is performed to set constantamounts of bits in units of N pictures, the coding rate can becontrolled to be a set value. In addition, the coding efficiency whichensures an optimum step size ratio of the respective pictures can beobtained, and amount-of-bits allocation can be performed to set anamount-of-bits ratio which prevents a deterioration in picture quality.Therefore, the coding efficiency can be considerably improved.Furthermore, since rate control is performed to cause the amount of bitsto approach a set amount of bits while a change in quantization stepsize is limited, the amount of bits can be controlled to be a set valuewithout causing a deterioration in picture quality, which occurs whenthe quantization step size is excessively changed.

An embodiment of a variable length code decoder will be described belowwith reference to FIG. 33.

Referring to FIG. 33, variable length code data is input to an inputterminal 1101 at a predetermined rate. Although this variable lengthcode data is not specifically limited, it is assumed, in this case, thatthis data includes data obtained by transforming picture data into acoefficient (DCT coefficient) having a small correlation value using DCT(discrete cosine transformation) in combination with adaptiveprediction, and quantizing the resultant data, quantizationcharacteristic information, and prediction method information.

A variable length code decoder 1110 decodes the variable length codedata and outputs the reproduction picture data to an inverse quantizer1120 at a pixel rate. In addition, the decoder 1110 outputs thequantization characteristic information and the prediction methodinformation to the inverse quantizer 1120 and an adaptive predictioncircuit 1150 at proper timings, respectively. The data inverselyquantized by the inverse quantizer 1120 is processed by an inverse DCTcircuit 1130, and difference data relative to the adaptive predictionsignal is restored.

The difference data output from the inverse DCT circuit 1130 is input toan adder 1140 to be added to the adaptive prediction signal output fromthe adaptive prediction circuit 1150 so as to reproduce picture data. Ofthe reproduced picture data, picture data to be referred by the adaptiveprediction circuit 1150 is stored in a reference picture temporarystorage circuit 1160 and is output to a scan converter 1170 when thenext reference picture is input.

The scan converter 1170 serves to change the order of output pixels. Thescan converter 1170 switches parallel signals, obtained byscan-converting picture data reproduced/output from the adder 1140 inunits of two-dimensional blocks into brightness signals and colorsignals in units of horizontal scanning lines, and parallel signals,constituted by brightness signals and color signals output from thereference picture temporary storage circuit 1160 in units of horizontalscanning lines, in the original picture order, and outputs them to apicture display unit such as a TV monitor.

The variable length code decoder 1110 shown in FIG. 33 will be describedbelow with reference to FIG. 34.

The variable length code decoder 1110 is mainly constituted by an inputdata temporary storage circuit 1210 and a code length detection/decodedvalue transform circuit 1220, as shown in FIG. 34. Variable length codedata input to an input terminal 1201 at a predetermined rate istemporarily stored in the input data temporary storage circuit 1210. Theinput data temporary storage circuit 1210 outputs data associated withthe information of at least one coefficient to the code lengthdetection/decoded value transform circuit 1220, in units of the numberof bits (M bits) corresponding to the maximum code length of thevariable length code, from a bit position designated by code length data1221 from the circuit 1220, at a pixel rate.

The code length detection/decoded value transform circuit 1220 detectsthe code length of the variable length code data associated with theinformation of each pixel, and transforms the variable length code datainto a decoded value. The circuit 1220 then transmits the code lengthdata 1221 indicating the code length of the decoded variable length codedata to the input data temporary storage circuit 1210 to designate thestart bit of the next variable length code data, and also outputs thedecoded data to an output terminal 1222.

The input data temporary storage circuit 1210 has the arrangement shownin FIG. 35, in which variable length code data input to an inputterminal 1301 at a predetermined rate is temporarily stored in a buffermemory 1310, and the variable length code data is output in parallel inunits of M bits designated by an address counter 1320. Code length dataindicating the code length of a variable length code decoded at eachclock by the code length detection/decoded value transform circuit 1220in FIG. 34 is input to an input terminal 1331.

An adder 1330 adds data (remainder data) 1341 indicating the remainderobtained by dividing the accumulated bit count of decoded variablelength codes by M to variable length data input from the input terminal1331 at each clock, and outputs the sum data to a one-clock delaycircuit 1340. The one-clock delay circuit 1340 outputs the remainderdata 1341 to the adder 1330 and a selector 1350, and at the same timeoutputs data (quotient data) 1342, obtained by dividing the sum dataoutput from the adder 1330 by M, to the address counter 1320 and shiftregisters 1360 and 1365.

Referring to FIG. 35, M is a power of 2 which is equal to or larger thanthe maximum code length. With this arrangement, the remainder data 1341and the quotient data 1342 can be simply obtained on the basis of onlyoutputs from the one-clock delay circuit 1340 without requiring anyspecial circuits for calculating the data 1341 and 1342.

The address counter 1320 increments the read address of the buffermemory 1310 every time the quotient data 1342 indicates that M-bit datais decoded. Loading operations of the shift registers 1360 and 1365 arealso controlled by the quotient data 1342 such that M-bit data aresequentially shifted and loaded every time the read address of thebuffer memory 1310 is changed. Note that the shift registers 1360 and1365 are initially set such that data are loaded from the buffer memory1310 to the registers 1360 and 1365 in units of M bits.

The selector 1350 is designed to perform selection at M:1. The selector1350 selects M-bit data from the start position of variable length codedata in accordance with the remainder data 1341, and outputs the data toan output terminal 1351.

FIG. 36 is a block diagram showing an arrangement of the code lengthdetection/decoded value transform circuit 1220 in FIG. 34. All the bitsof M-bit data 1402 input from the input data temporary storage circuit1210 in FIG. 34 to an input terminal 1401 are input to a sequencer 1410.Upper bits 1403 of the data 1402 are input to a regular pattern lengthdetector 1420. Lower bits 1404 of the data 1402 are input to a selector1430. The sequencer 1410 detects fixed length control data 1411, and atthe same time monitors decoded data 1441 to perform switching andcontrol operations in accordance with the type of data to be decodednext, e.g., switching of the types of variable length code decodingtables 1440 constituted by ROMs, switching of the types of regularpatterns detected by the regular pattern length detector 1420, switchingof decoding methods in an attendant code decoded value transformer 1460,and control of a selector 1480. The selector 1480 performs switchingbetween the code length of a fixed length code detected by the sequencer1410 and the code length of a variable length code.

The regular pattern length detector 1420 detects the number ofsuccessive "0"s or "1"s (0/1 run), the number of alternately successive"0"s and "1"s in units of a specific number of bits, or the like inaccordance with a design rule for a variable length code, and outputsdetection data 1421 to the variable length code decoding table 1440, theselector 1430, and an adder 1470.

The selector 1430 outputs lower bit data 1431, obtained by removing thebit count detected by the regular pattern length detector 1420 from theupper bits of the data 1402, to a selector 1450, and outputs data 1432consisting of upper bits of the data 1431 to the variable length codedecoding table 1440.

The variable length code decoding table 1440 outputs a decoded value1441 corresponding to a variable length code, code length data 1442following the regular pattern of the variable length code, code lengthdata 1443 following the variable length code, data 1444 indicatingwhether all the decoded value is expressed by an attendant code, and thelike on the basis of the regular pattern length data 1421, the partialdata 1431 following the regular pattern, and code type data from thesequencer 1410.

The selector 1450 outputs lower bit data 1451, obtained by removing thebit count indicated by the code length data 1442 from the upper bits ofthe output data 1431 from the selector 1430, to the attendant codedecoded value transformer 1460.

The attendant code decoded value transformer 1460 decodes dataaccompanying the variable length code by using data of a bit countcorresponding to the attendant code length data 1443 of the output data1451 from the selector 1450 in accordance with a rule designated by thesequencer 1410.

A selector 1485 normally outputs both the decoded value 1441 and theoutput data from the attendant code decoded value transformer 1460 to anoutput terminal 1486. If the data 1444 indicates that all the decodedvalue is expressed by an attendant code, the selector 1485 outouts onlythe output data from the attendant code decoded value transformer 1460,as a decoded value, to the output terminal 1486.

The adders 1470 and 1478 calculate the code length of the variablelength code including the accompanying data, and output the dataindicating the code length of the decoded variable length code to anoutput terminal 1481 through the selector 1480.

FIG. 37 is a block diagram showing another arrangement of the codelength detection/decoded value transform circuit 1220, which is suitablefor a case wherein a code accompanying a variable length code is aregular variable length code. The difference between this circuit andthe circuit shown in FIG. 36 will be mainly described below.

A variable length code decoding table 1540 outputs data 1543 indicatingthe minimum code length of an attendant code with respect to a decodedvariable length code. An attendant code decoded value transformer 1560outputs data indicating the difference between the code length indicatedby the minimum code length data 1543 and the actual attendant codelength to an adder 1574. The adder 1574 calculates a table of all thecodes for the attendant code on the basis of the difference data.

In this embodiment, no buffer is arranged at a decoded value data outputsection. If, however, some buffer is used at the decoded value dataoutput section, decoding can be performed at a clock rate slightlyhigher than a pixel rate, and additional information, such as controldata, other than pixel value information, can be decoded with asufficient margin.

According to the above-described embodiment, at any coding rate, thememory capacity required to convert reproduced picture data into datawith a pixel rate can be greatly reduced as compared with the prior art,even if variable length codes of picture data are decoded by clockscorresponding to the pixel rate at a relatively low speed. That is, theoperation speed and the memory capacity can be reduced at once.

An embodiment of a video decoding apparatus will be described below withreference to FIG. 38.

Referring to FIG. 38, an input video signal 1610 representing a videoconstituting a to-be-coded picture is input to a subtracter 1611. Thesubtracter 1611 calculates the difference between the input video signal1610 and a prediction video signal 1612 formed in the manner describedlater, thus forming a predictive difference signal 1613. The predictivedifference signal 1613 is subjected to discrete cosine transformation ina DCT (discrete cosine transformation) circuit 1614. The DCT coefficientdata obtained by the DCT circuit 1614 is quantized by a quantizer 1615.The signal quantized by the quantizer 1615 is branched in twodirections. One signal is coded into a variable length code by avariable length coder 1617 and is converted into data with apredetermined transmission rate by a buffer 1618. The data is thenoutput to a transmission path 1619. The other signal sequentiallyundergoes processing, in an inverse quantizer 1620 and an IDCT (inversediscrete cosine transformation) circuit 1621, which is inverse to theprocessing performed by the quantizer 1615 and the DCT circuit 1614. Theresultant signal is added to the prediction video signal 1612. With thisoperation, a local decoded signal 1623 is generated.

The local decoded signal 1623 generated in the above-described manner isselectively input to first and second frame memories 1625 and 1626through a switch circuit 1624. Motion vectors from first and secondmotion vector detection circuits 1627 and 1628 are respectively input tothe frame memories 1625 and 1626. The motion vector detection circuits1627 and 1628 respectively detect motions between frames by using theinput video signal 1610 and the output signals from the frame memories1625 and 1626, and generate information indicating the directions andamounts of the motions, i.e., motion vectors. In accordance with thesemotion vectors, video signals which have undergone motion compensationare read out from the frame memories 1625 and 1626.

Output signals 1631 and 1632 from the frame memories 1625 and 1626 areinput to an averaging circuit 1630 and a switch circuit 1634. Theaveraging circuit 1630 outputs a signal 1633 obtained by averaging theoutput signals 1631 and 1632 from the frame memories 1625 and 1626. Theswitch circuit 1634 selects one of the output signals 1631 and 1632 fromthe frame memories 1625 and 1626 or the output signal from the averagingcircuit 1630, and outputs it as the prediction video signal 1612.

A coding control circuit 1627 switches the quantization step sizes inthe quantizer 1615 and the inverse quantizer 1620 to finer or coarserstep sizes depending on whether the input video signal 1601 represents afirst or second type frame, and perform rate control in accordance withthe occupied amount of the buffer 1618. In addition, the coding controlcircuit 1627 performs switching control of the switch circuits 1624 and1634. Note that switching of the quantization step sizes is performed inaccordance with a predetermined rule, e.g., every other frame of aninput video signal. The switch circuit 1634 selects a signal having theminimum predictive difference signal 1613 from the output signals 1631,1632, and 1633 from the frame memories 1625 and 1626 and the averagingcircuit 1630 under the control of the coding control circuit 1627.

FIG. 39 is a view illustrating the relationship between to-be-codedframes and reference frames used to form prediction video signals. Inthis embodiment, as shown in FIG. 39, in coding of to-be-coded frames,frames are classified into first type frames P1, P2, . . . for which arelatively fine quantization step size is used, and second type framesP1', P2', . . . for which a relatively coarse quantization step size isused, and past two first frames relative to to-be-coded frames are usedas reference pictures.

In a conventional method, for example, the first type frame P2 is usedfor the second type frame P2' and the first type frame P3, and the firsttype frame P3 is used for the second type frame P3' and the first typeframe P4. That is, past one first type frame is used as a referenceframe. In contrast to this, in this embodiment, for example, the firsttype frame P1 is used as a reference frame in addition to the first typeframe P2 for the to-be-coded frames P2' and P3, and the frame P2 is usedas a reference frame in addition to the frame P3 for the to-be-codedframes P3' and P4. That is, one first type frame is additionally used asa reference frame.

Table 3 shows the relationship between to-be-coded frames represented bythe input video signal 1610 and input/output of the frame memories 1625and 1626.

                  TABLE 3                                                         ______________________________________                                        Coding                                                                        ______________________________________                                        To-be-coded picture                                                                         P2      P2'     P3'   P3   P4                                   FM1 output    P0      P2      P2    P2   P2                                   FM2 output    P1      P1      P1    P3   P3                                   FM1 input     P2      --      --    --   P4                                   FM2 input     --      --      P3    --   --                                   ______________________________________                                    

As described above, in this embodiment, past two first type framesrelative to to-be-coded frames are used as reference frames, one ofvideo signals representing past two first type frames(motion-compensated video signals output from the frame memories 1625and 1626) or a signal obtained by averaging, i.e., interpolating, thetwo signals using the averaging circuit 1630 is selected by the switchcircuit 1634. That is, a signal having the minimum predictive differencesignal 1613 is selected as the prediction video signal 1612. Therefore,in comparison with the conventional method, the hardware size isincreased because each of the coding and decoding apparatuses requiretwo frame memories. However, since two first type frames are used asreference frames to form the prediction video signal 1612, theprediction precision is increased, and the coding efficiency isimproved. In addition, since future frames are not used as referenceframes, an increase in delay time in coding/decoding operations can beprevented.

FIG. 40 is a view illustrating the relationship between to-be-codedframes and reference frames used to form prediction video signalsaccording to another embodiment. In this embodiment, a past frame isadditionally used as a reference frame for second type frames P1', P2',P3', . . . in another conventional method.

More specifically, in another conventional method, for example, a frameP2 is used for the frame P2', and a frame P3 is used for the frame P3'.That is, past one first type frame is used as a reference frame. Incontrast to this, in this embodiment, for example, a frame P1 is used asa reference frame in addition to the frame P2 for the to-be-coded frameP2', and the frame P2 is used as a reference frame in addition to theframe P3 for the to-be-coded frame P3'. That is, as a first type frameused as a reference frame, past one first type frame second nearest to ato-be-coded frame is added.

Table 2 shows the relationship between to-be-coded frames represented bythe input video signal 1610 and input/output of the frame memories 1625and 1626 in this embodiment.

                  TABLE 2                                                         ______________________________________                                        Coding                                                                        ______________________________________                                        To-be-coded picture                                                                         P2      P2'     P3'   P3   P4                                   FM1 output    P1'     P2      P2    P2   P3'                                  FM2 output    P1      P1      P2'   P3   P3                                   FM1 input     P2      --      --    P3'  P4                                   FM2 input     --      P2'     P3    --   --                                   ______________________________________                                    

As described above, in this embodiment, since the maximum number (=2) ofreference frames is not increased, the hardware size is not increased.In addition, when a to-be-coded frame is a second type frame, since twofirst type frames can be used as reference pictures to form theprediction video signal 1612, the precision of the prediction videosignal 1612 for a second type frame is increased, and the codingefficiency is improved.

In the above-described embodiments, first and second type frames arearranged alternately in terms of time. However, the present inventioncan be applied to a case wherein first and second type frames arearranged in a different manner in terms of time. In addition, in eachembodiment described above, past two frames are used as referenceframes. However, the present invention can be used to a case wherein alarger number of reference frames are used.

As has been described above, according to the present invention, whenvideo signals are to be coded by using an inter-frame predictive codingscheme, especially the motion compensation inter-frame predictive codingscheme, the coding efficiency with respect to moving pictures having lowintra-frame correlation and high inter-frame correlation, which aregenerally considered to be difficult to code, can be improved withoutincreasing the delay time in coding/decoding operations, therebyrealizing video coding suitable for fields of application requiring ashort delay time, e.g., realtime communication.

Additional advantages and modifications will readily occur to thoseskilled in the art. Therefore, the invention in its broader aspects isnot limited to the specific details, and representative devices shownand described herein. Accordingly, various modifications may be madewithout departing from the spirit or scope of the general inventiveconcept as defined by the appended claims and their equivalents.

What is claimed is:
 1. A video coding apparatus comprising:memory meansfor storing a coded picture signal used as a reference picture signal;motion vector detecting means for detecting, from a picture read outfrom said memory means, a motion vector regarding a to-be-coded picture;searching range limiting means for limiting a range of the referencepicture signal which said motion vector detecting means searches for ina motion vector detection; prediction signal producing means forproducing a prediction signal based on the reference picture signaldesignated by the motion vector detected by said motion vector detectingmeans; and coding means for coding the picture signal on the basis ofthe motion vector and the prediction signal, wherein said searchingrange limiting means limits the searching range so as to be narrower inthe reference picture remoter in time from the to-be-coded picture thanin the reference picture close in time thereto.
 2. A video codingapparatus comprising:memory means for storing a coded picture signalused as a reference picture signal; motion vector detecting means fordetecting, from a picture read out from said memory means, a motionvector regarding a to-be-coded picture; searching range limiting meansfor limiting a range of the reference picture signal which said motionvector detecting means searches for in a motion vector detection;prediction signal producing means for producing a prediction signalbased on the reference picture signal designated by the motion vectordetected by said motion vector detecting means; and coding means forcoding the picture signal on the basis of the motion vector and theprediction signal, wherein said searching range limiting means includesmeans for inhibiting detection of the motion vector from the referencepicture remoter in time from the to-be-coded picture when the motionvector detected from the reference picture close in time to theto-be-coded picture is not less than a predetermined value.
 3. A videocoding apparatus comprising:memory means for storing a coded picturesignal used as a reference picture signal; motion vector detecting meansfor detecting, from a picture read out from said memory means, a motionvector regarding a to-be-coded picture; searching range limiting meansfor limiting a range of the reference picture signal which said motionvector detecting means searches for in a motion vector detection;prediction signal producing means for producing a prediction signalbased on the reference picture signal designated by the motion vectordetected by said motion vector detecting means; and coding means forcoding the picture signal on the basis of the motion vector and theprediction signal, wherein said searching range limiting means limitsthe searching range for the reference picture remoter in time from theto-be-coded picture to a range corresponding to an extended line fromthe motion vector detected from the reference picture close in time tothe to-be-coded picture.
 4. A video coding apparatus comprising:memorymeans for storing a coded picture signal used as a reference picturesignal; motion vector detecting means for detecting, from a picture readout from said memory means, a motion vector regarding a to-be-codedpicture; searching range limiting means for limiting a range of thereference picture signal which said motion vector detecting meanssearches for in a motion vector detection; prediction signal producingmeans for producing a prediction signal based on the reference picturesignal designated by the motion vector detected by said motion vectordetecting means; coding means for coding the picture signal on the basisof the motion vector and the prediction signal; and a motion vectorcandidate generating means for generating plural motion vectorcandidates for designating plural partial pictures of plural referencepictures read out from said memory means, and wherein said predictionsignal producing means includes prediction signal candidate producingmeans for subjecting a filtering processing corresponding to a type ofeach of the motion vector candidates output from said motion vectorcandidate generating means to each of the partial pictures to produceplural prediction signal candidates, wherein the motion vector detectingmeans selects an optimum prediction signal among the prediction signalcandidates which is most optimum to the to-be-coded picture, and outputsthe optimum prediction signal and an optimum motion vector correspondingthereto.
 5. A video coding apparatus comprising:memory means for storinga coded picture signal used as a reference picture signal; motion vectordetecting means for detecting, from a picture read out from said memorymeans, a motion vector regarding a to-be-coded picture; searching rangelimiting means for limiting a range of the reference picture signalwhich said motion vector detecting means searches for in a motion vectordetection; prediction signal producing means for producing a predictionsignal based on the reference picture signal designated by the motionvector detected by said motion vector detecting means; and coding meansfor coding the picture signal on the basis of the motion vector and theprediction signal, wherein said prediction signal producing meansproduces a prediction signal corresponding to a to-be-coded picturesignal, using selectively plural different prediction signal producingmethods, and said coding means includes quantization means forquantizing a difference between the prediction signal produced by saidprediction signal producing means and the to-be-coded picture signal,and means for variable-length coding a quantized signal obtained by saidquantization means, and which includes storage means for storing aquantization step size and an amount of bits used for each coded picturesignal obtained by said coding means, estimate amount calculation meansfor calculating a predetermined amount used for picture coding which iscorrelative to the amount of bits, and initial value setting means forsetting initial values of an allocated amount of bits and a quantizationstep size every next to-be-coded picture signal in accordance with thequantization step size, the generated amount-of-bits and the bitestimate amount.
 6. The video coding apparatus according to claim 5,wherein said storage means includes virtual buffer means for storing acode sequence, and means for extracting the code sequence from saidvirtual buffer means a predetermined constant value at eachpredetermined to-be-coded picture region timing, and said quantizationmeans includes means for controlling a quantization step size used insaid quantization means on the basis of an occupied amount of saidvirtual buffer means.
 7. The video coding apparatus according to claim6, wherein said quantization means includes means for increasing thequantization step size used in said quantization means when the occupiedamount of said virtual buffer means exceeds a first threshold value anda previous occupied amount of the virtual buffer means, and decreasingit when the occupied amount is less than a second threshold value and aprevious occupied amount.
 8. A video coding apparatus comprising:amemory which stores a coded picture signal used as a reference picturesignal; a motion vector detecting mechanism configured to detect, from apicture read out from said memory, a motion vector regarding ato-be-coded picture; a searching range limiting mechanism configured tolimit a range of the reference picture signal for which said motionvector detecting mechanism searches in a motion vector detection; aprediction signal producing mechanism configured to produce a predictionsignal based on the reference picture signal designated by the motionvector detected by said motion vector detecting mechanism; and a coderwhich codes the picture signal on the basis of the motion vector and theprediction signal, wherein said searching range limiting mechanism isconfigured to limit the searching range so as to be narrower in thereference picture remoter in time from the to-be-coded picture than inthe reference picture close in time thereto.
 9. A video coding apparatuscomprising:a memory which stores a coded picture signal used as areference picture signal; a motion vector detecting mechanism configuredto detect, from a picture read out from said memory, a motion vectorregarding a to-be-coded picture; a searching range limiting mechanismconfigured to limit a range of the reference picture signal for whichsaid motion vector detecting mechanism searches in a motion vectordetection; a prediction signal producing mechanism configured to producea prediction signal based on the reference picture signal designated bythe motion vector detected by said motion vector detecting mechanism;and a coder which codes the picture signal on the basis of the motionvector and the prediction signal, wherein said searching range limitingmechanism includes an inhibiting mechanism configured to inhibitdetection of the motion vector from the reference picture remoter intime from the to-be-coded picture when the motion vector detected fromthe reference picture close in time to the to-be-coded picture is notless than a predetermined value.
 10. A video coding apparatuscomprising:a memory which stores a coded picture signal used as areference picture signal; a motion vector detecting mechanism configuredto detect, from a picture read out from said memory, a motion vectorregarding the to-be-coded picture; a searching range limiting mechanismconfigured to limit a range of the reference picture signal for whichsaid motion vector detecting mechanism searches in a motion vectordetection; a prediction signal producing mechanism configured to producea prediction signal based on the reference picture signal designated bythe motion vector detected by said motion vector detecting mechanism;and a coder which codes the picture signal on the basis of the motionvector and the prediction signal, wherein said searching range limitingmechanism is configured to limit the searching range for the referencepicture remoter in time from the to-be-coded picture to a rangecorresponding to an extended line from the motion vector detected fromthe reference picture close in time to the to-be-coded picture.
 11. Avideo coding apparatus comprising:a memory which stores a coded picturesignal used as a reference picture signal; a motion vector detectingmechanism configured to detect, from a picture read out from saidmemory, a motion vector regarding a to-be-coded picture; a searchingrange limiting mechanism configured to limit a range of the referencepicture signal for which said motion vector detecting mechanism searchesin a motion vector detection; a prediction signal producing mechanismconfigured to produce a prediction signal based on the reference picturesignal designated by the motion vector detected by said motion vectordetecting mechanism; a coder which codes the picture signal on the basisof the motion vector and the prediction signal; a motion vectorcandidate generating mechanism configured to generate plural motionvector candidates which designates plural partial pictures of pluralreference pictures read out from said memory, and wherein saidprediction signal producing mechanism includes a prediction signalcandidate producing mechanism configured to apply a filtering processingcorresponding to a type of each of the motion vector candidates outputfrom said motion vector candidate generating mechanism to each of thepartial pictures to produce plural prediction signal candidates; and amotion vector detecting mechanism configured to select an optimumprediction signal from among the prediction signal candidates that ismost optimum to the to-be-coded picture, and to output the optimumprediction signal and an optimum motion vector corresponding thereto.12. A video coding apparatus comprising:a memory which stores a codedpicture signal used as a reference picture signal; a motion vectordetecting mechanism configured to detect, from a picture read out fromsaid memory, a motion vector regarding a to-be-coded picture; asearching range limiting mechanism configured to limit a range of thereference picture signal for which said motion vector detectingmechanism searches in a motion vector detection; a prediction signalproducing mechanism configured to produce a prediction signal based onthe reference picture signal designated by the motion vector detected bysaid motion vector detecting mechanism; and a coder which codes thepicture signal on the basis of the motion vector and the predictionsignal, wherein said prediction signal producing mechanism is configuredto produce a prediction signal corresponding to a to-be-coded picturesignal using selectively plural different prediction signal producingmethods, and said coder includes a quantizer which quantizes adifference between the prediction signal produced by said predictionsignal producing mechanism and the to-be-coded picture signal, and avariable-length coder which subjects variable-length coding to aquantized signal obtained by said quantizer, and which includes astorage which stores a quantization step size and an amount of bits usedfor each coded picture signal obtained by said coder, an estimate amountcalculation mechanism configured to calculate a predetermined amountused for picture coding which is correlative to the amount of bits, andan initial value setting mechanism configured to set initial values ofan allocated amount of bits and a quantization step size every nextto-be-coded picture signal in accordance with the quantization stepsize, the generated amount-of-bits and the bit estimate amount.
 13. Thevideo coding apparatus according to claim 12, wherein:said storageincludes a virtual buffer memory which stores a code sequence, and anextraction mechanism configured to extract the code sequence from saidvirtual buffer memory a predetermined constant value at eachpredetermined to-be-coded picture region timing; and said quantizerincludes a controller which controls the quantization step size used insaid quantizer on the basis of an occupied amount of said virtual buffermemory.
 14. The video coding apparatus according claim 13, wherein saidquantizer includes a control mechanism configured to increase thequantization step size used in said quantizer when the occupied amountof said virtual buffer memory exceeds a first threshold value and aprevious occupied amount of the virtual buffer memory, and to decreasethe quantization step size when the occupied amount is less than asecond threshold value and a previous occupied amount.
 15. A videocoding method comprising:storing a coded picture signal used as areference picture signal in a memory; detecting, from a picture read outfrom said memory, a motion vector regarding a to-be-coded picture;limiting a searching range of the reference picture signal in a motionvector detection so as to be narrower in the reference picture remoterin time from the to-be-coded picture than in the reference picture closein time thereto; producing a prediction signal based on the referencepicture signal designated by the motion vector detected by saiddetecting step; and coding the picture signal on the basis of the motionvector and the prediction signal.
 16. A video coding methodcomprising:storing a coded picture signal used as a reference picturesignal in a memory; detecting, from a picture read out from said memory,a motion vector regarding a to-be-coded picture; limiting a searchingrange of the reference picture signal in a motion vector detection,comprising inhibiting detection of the motion vector from the referencepicture remoter in time from the to-be-coded picture when the motionvector detected from the reference picture close in time to theto-be-coded picture is not less than a predetermined value; producing aprediction signal based on the reference picture signal designated bythe motion vector detected by said detecting step; and coding thepicture signal on the basis of the motion vector and the predictionsignal.
 17. A video coding method comprising the steps of:storing acoded picture signal used as a reference picture signal in a memory;detecting, from a picture read out from said memory, a motion vectorregarding a to-be-coded picture; limiting a searching range of thereference picture signal in a motion vector detection, includinglimiting the searching range for the reference picture remoter in timefrom the to-be-coded picture to a range corresponding to an extendedline from the motion vector detected from the reference picture close intime to the to-be-coded picture; producing a prediction signal based onthe reference picture signal designated by the motion vector detected bysaid detecting step; and coding the picture signal on the basis of themotion vector and the prediction signal.
 18. A video coding methodcomprising:storing a coded picture signal used as a reference picturesignal in a memory; detecting, from a picture read out from said memory,a motion vector regarding a to-be-coded picture; limiting a searchingrange of the reference picture signal in a motion vector detection;producing a prediction signal based on the reference picture signaldesignated by the motion vector detected by said detecting step; codingthe picture signal on the basis of the motion vector and the predictionsignal; generating plural motion vector candidates for designatingplural partial pictures of plural reference pictures read out from saidmemory, and wherein said prediction signal producing step includessubjecting a filtering processing corresponding to a type of each of themotion vector candidates obtained in said motion vector candidategenerating step to each of the partial pictures to produce pluralprediction signal candidates; and selecting an optimum prediction signalfrom among the prediction signal candidates that is most optimum to theto-be-coded picture to obtain the optimum prediction signal and anoptimum motion vector corresponding thereto.
 19. A video coding methodcomprising:storing a coded picture signal used as a reference picturesignal in a memory; detecting, from a picture read out from said memory,a motion vector regarding a to-be-coded picture; limiting a searchingrange of the reference picture signal in a motion vector detection;producing a prediction signal based on the reference picture signaldesignated by the motion vector detected by said detecting stepcomprising a prediction signal corresponding to a to-be-coded picturesignal, using selectively plural different prediction signal producingmethods; coding the picture signal on the basis of the motion vector andthe prediction signal comprising quantizing a difference between theprediction signal obtained in said prediction signal producing step andthe to-be-coded picture signal, and subjecting variable-length coding toa quantized signal obtained in said quantizing step; storing aquantization step size and an amount of bits used for each coded picturesignal obtained in said coding step; calculating a predetermined amountused for picture coding which is correlative to the amount of bits; andsetting initial values of an allocated amount of bits and thequantization step size every next to-be-coded picture signal inaccordance with the quantization step size, the generatedamount-of-bits, and the bit estimate amount.
 20. The video coding methodaccording to claim 19, wherein:said storing step includes storing a codesequence in a virtual buffer memory and extracting the code sequencefrom said virtual buffer memory a predetermined constant value at eachpredetermined to-be-coded picture region timing; and said quantizingstep includes controlling the quantization step size on the basis of anoccupied amount of said virtual buffer memory, the video coding methodfurther comprising.
 21. The video coding method according to claim 20,wherein said quantizing step comprises:increasing the quantization stepsize when the occupied amount of said virtual buffer memory exceeds afirst threshold value and a previous occupied amount of the virtualbuffer memory; and decreasing the quantization step size when theoccupied amount is less than a second threshold value and a previousoccupied amount.